<h1>MPR API</h1>
<a name="mpr.h"></a>
<p>The Multithreaded Portable Runtime (MPR) is a portable runtime library for embedded applications.</p>
<p><h1><bold>Description</bold>:</h1><p>The MPR provides management for logging, error handling, events, files, memory, ssl, sockets, strings, JSON, and date/time functions. It also provides a foundation of safe routines for secure programming, that help to prevent buffer overflows and other security threats. The MPR is a library and a C API that can be used in both C and C++ programs. <br/><br/>
The MPR uses a set extended typedefs for common types. These include: bool, cchar, cvoid, uchar, short, ushort, int, uint, long, ulong, int32, uint32, int64, uint64, float, and double. The cchar type is a const char, cvoid is const void. Several types have &quot;u&quot; prefixes to denote unsigned qualifiers. <br/><br/>
The MPR includes a memory allocator and generational garbage collector. The allocator is a fast, immediate coalescing allocator that will return memory back to the O/S if not required. It is optimized for frequent allocations of small blocks (&lt; 4K) and uses a scheme of free queues for fast allocation. <br/><br/>
The MPR provides a high-performance thread-pool to share threads as required to service clients. When a client request arrives, the MPR allocates an event queue called a dispatcher. This dispatcher then serializes all activity for the request so that it essentially runs single-threaded This simplifies the code as most interactions do not need to be lock protected. When a request has activity, it borrows a thread from the thread pool, does its work and then returns the thread to the thread pool. This all happens very quickly, so a small pool of threads are effectivelyshared over many requests. Thread are free to block if required, but typically non-blocking patterns are more economical. If you have non-MPR threads that need to call into the MPR, you must synchronize such calls via <ref refid="mpr_8h_1abdf25e12b2bcc5c116599b639cc18d5c" kindref="member">mprCreateEvent</ref>. </p></p>
<table class="apiIndex" title="Extensions">
</table>
<a name="Functions"></a>

<h2>Function Index</h2>
  <table class="apiIndex" title="Function Index">
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a80adc8087f3a20a2669565b281d57a38" class="nameRef">assert</a>(<a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> cond)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Assert that a condition is true.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1ac9965b367cc103b9ae701b08110180b2" class="nameRef">fmt</a>(char *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> maxSize, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...) PRINTF_ATTRIBUTE(3</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Format a string into a static buffer.</td></tr>
<tr class="apiDef"><td class="apiType">char char *</td><td><a href="#mpr_8h_1a057c5cdc238153c4f9c0c3b1ce7dbd25" class="nameRef">fmtv</a>(char *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> maxSize, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, va_list args)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Format a string into a statically allocated buffer.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1acb2fb0ada13ab5df81837faa4f8f45b8" class="nameRef">itos</a>(<a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> value)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Convert an integer to a string.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a09d77f66f305e34c9d8f38d0f108a9b0" class="nameRef">itosbuf</a>(char *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size, <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> value, int radix)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Convert an integer to a string buffer.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a8134ad4cbe9efa965155df9ca8bb29bf" class="nameRef">itosradix</a>(<a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> value, int radix)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Convert an integer to a string.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_socket" class="ref">MprSocket</a> *</td><td><a href="#mpr_8h_1a98a5078070502539018c68b030e7c416" class="nameRef">mprAcceptSocket</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *listen)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Accept an incoming connection.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_key" class="ref">MprKey</a> *</td><td><a href="#mpr_8h_1a2e4b46bada003ec29ed09e244fe89e50" class="nameRef">mprAddDuplicateKey</a>(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *key, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Add a duplicate symbol value into the hash table.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1aace8a812b003454accd5f45079b8dd24" class="nameRef">mprAddFileSystem</a>(<a href="#struct_mpr_file_system" class="ref">MprFileSystem</a> *fs)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create and initialize the disk FileSystem.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1abf10109abc063c47702769c0e89442cf" class="nameRef">mprAddItem</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *item)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Add an item to a list.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_key" class="ref">MprKey</a> *</td><td><a href="#mpr_8h_1a5160d52c756eb2c01ee97657c1a6f678" class="nameRef">mprAddKey</a>(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *key, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Add a symbol value into the hash table.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_key" class="ref">MprKey</a> *</td><td><a href="#mpr_8h_1ae8cce7d49083048e263517335bcdbfa8" class="nameRef">mprAddKeyFmt</a>(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *key, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...) PRINTF_ATTRIBUTE(3</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Add a key with a formatting value into the hash table.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_key" class="ref">MprKey</a> *</td><td><a href="#mpr_8h_1a13063df55ce4f9037cdbe18ba15242f5" class="nameRef">mprAddKeyWithType</a>(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *key, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr, int type)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Add a symbol value into the hash table and set the key type.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_mime" class="ref">MprMime</a> *</td><td><a href="#mpr_8h_1a9a1e42096f8a786e2f7836440aab492f" class="nameRef">mprAddMime</a>(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ext, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *mimeType)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Add a mime type to the mime type table.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a8a5c06bd4458f58c9ed20d043b21bba3" class="nameRef">mprAddNullItem</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Add a null item to the list.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a159c096de4aec192e25b275f1f5e031d" class="nameRef">mprAddNullToBuf</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Add a null character to the buffer contents.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a3b66bfcf86dc9f50510341e7b5490326" class="nameRef">mprAddRoot</a>(<a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Add a memory block as a root for garbage collection.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_signal" class="ref">MprSignal</a> *</td><td><a href="#mpr_8h_1af41c40264929d075b340fc328165aca4" class="nameRef">mprAddSignalHandler</a>(int signo, void *handler, void *arg, <a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Add a signal handler.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_wait_handler" class="ref">MprWaitHandler</a> *</td><td><a href="#mpr_8h_1a80b7c4b8dc7eeac71df1230b8c5eff67" class="nameRef">mprAddSocketHandler</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, int mask, <a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher, void *proc, void *data, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Add a wait handler to a socket.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a86d99126f5c4cf54edda02c98a9142a3" class="nameRef">mprAddSslCiphers</a>(struct MprSsl *ssl, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ciphers)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Add the ciphers to use for SSL.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a22299171461b47afdd349666b0c0b996" class="nameRef">mprAddStandardSignals</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Add standard trapping of system signals.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a34490595fe86683f06e8d6e9abc72aa3" class="nameRef">mprAddTerminator</a>(<a href="#mpr_8h_1a4b92b1380a1bcb694131c104e1062c4f" class="ref">MprTerminator</a> terminator)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Add a service terminator.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a95de494427536885cd80187593d45d91" class="nameRef">mprAdjustBufEnd</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> count)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Adjust the buffer end position.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a52128fe8a192cd1cf4541cccf6ce3625" class="nameRef">mprAdjustBufStart</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> count)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Adjust the buffer start position.</td></tr>
<tr class="apiDef"><td class="apiType">void *</td><td><a href="#mpr_8h_1abfa0e5a5c18263ee535d104e214bdaf1" class="nameRef">mprAlloc</a>(<a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a> size)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Allocate a block of memory.</td></tr>
<tr class="apiDef"><td class="apiType">void *</td><td><a href="#mpr_8h_1a6e7ed2574cd71cdf20ae4467f18b4ce9" class="nameRef">mprAllocMem</a>(<a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a> size, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Allocate a block of memory.</td></tr>
<tr class="apiDef"><td class="apiType">void *</td><td><a href="#mpr_8h_1af395822a182e994a4e8e60059d63b24b" class="nameRef">mprAllocObj</a>(<a href="#mpr_8h_1aa49213f0ee6903f508c444506c07dae1" class="ref">Type</a> type, <a href="#mpr_8h_1ad5e84d898dd29853b54cc1b49fcb4041" class="ref">MprManager</a> manager)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Allocate an object of a given type.</td></tr>
<tr class="apiDef"><td class="apiType">void *</td><td><a href="#mpr_8h_1ae6d19445d6e7dbcb7aae8339b3d1968b" class="nameRef">mprAllocObjWithFlags</a>(<a href="#mpr_8h_1aa49213f0ee6903f508c444506c07dae1" class="ref">Type</a> type, <a href="#mpr_8h_1ad5e84d898dd29853b54cc1b49fcb4041" class="ref">MprManager</a> manager, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Allocate an object of a given type.</td></tr>
<tr class="apiDef"><td class="apiType">void *</td><td><a href="#mpr_8h_1af9dece42b780959e3267d2ad42286b17" class="nameRef">mprAllocZeroed</a>(<a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a> size)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Allocate a zeroed block of memory.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_list" class="ref">MprList</a> *</td><td><a href="#mpr_8h_1a31498982b50be3573536bb4cd5acaee2" class="nameRef">mprAppendList</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list, <a href="#struct_mpr_list" class="ref">MprList</a> *add)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Append a list.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a41a0e9cb643e435b21d5ff37658beec9" class="nameRef">mprAreCmdEventsEnabled</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, int channel)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Return true if command events are enabled.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a912d39c3467b133438b984c79c02aee3" class="nameRef">mprAssert</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *loc, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *msg)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Output an assure assertion failed message.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1af64ed09ca5470083fd11e73c9611b3f3" class="nameRef">mprAtomicAdd</a>(volatile int *target, int value)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Atomic Add.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a70c05a2808827f0f5881a1961c95290c" class="nameRef">mprAtomicAdd64</a>(volatile int64 *target, <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> value)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Atomic 64 bit Add.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a37da6d7e22d7022da59b6e2930847afa" class="nameRef">mprAtomicBarrier</a>(int model)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Apply a full (read+write) memory barrier.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1adfb5ebec7f3b7ce4922916dcc49a5749" class="nameRef">mprAtomicCas</a>(void *volatile *target, void *expected, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *value)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Atomic Compare and Swap.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a3f7604ac56fad55fbbb4cd38e742b8d1" class="nameRef">mprAtomicListInsert</a>(void **head, void **link, void *item)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Atomic list insertion.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a8e2df88e318f2fbfedc3eb6519e77bf0" class="nameRef">mprAtomicOpen</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Open and initialize the atomic subsystem.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_file" class="ref">MprFile</a> *</td><td><a href="#mpr_8h_1a4410e62e1813571e751d231135522476" class="nameRef">mprAttachFileFd</a>(int fd, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, int omode)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Attach to an existing file descriptor.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a763ac59e203e29a6cb6f21a556008ee1" class="nameRef">mprAvailableWorkers</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the count of available worker threads Return the count of free threads in the worker thread pool.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a5f95e2768c6f5e77ebec25bc471d55cb" class="nameRef">mprBackupLog</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, int count)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Backup a log.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_hash" class="ref">MprHash</a> *</td><td><a href="#mpr_8h_1ae82b297b198628e711f84fc62ff9d0f6" class="nameRef">mprBlendHash</a>(<a href="#struct_mpr_hash" class="ref">MprHash</a> *target, <a href="#struct_mpr_hash" class="ref">MprHash</a> *other)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Blend two hash tables.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1ae916ca4eacb71b4fda228fa7cbb977d3" class="nameRef">mprBlendJson</a>(<a href="#struct_mpr_json" class="ref">MprJson</a> *dest, <a href="#struct_mpr_json" class="ref">MprJson</a> *src, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Blend two JSON objects.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a4a53a1cb08f0054bea68b74855d555fd" class="nameRef">mprBreakpoint</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Trigger a breakpoint.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a2dd6f8d47006829959a15ce9af142448" class="nameRef">mprBufToString</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Convert the buffer contents to a string.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a757ee20c010c60a42e916537b7a89453" class="nameRef">mprCancelShutdown</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Cancel a shutdown request.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1aa7361e36abe129b975148d3f6faeff8c" class="nameRef">mprCheckPassword</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *plainTextPassword, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *passwordHash)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Check a plain-text password against the defined hashed password.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1acf49292693e22c7bdc43fbb41a83817d" class="nameRef">mprClearList</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Clears the list of all items.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a5c7b937729e211ad389b99c2fc8c82b7" class="nameRef">mprClearWaiting</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Clear the event service waiting flag.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_buf" class="ref">MprBuf</a> *</td><td><a href="#mpr_8h_1a89bacfb9bbb1c8129e41210a7f878f13" class="nameRef">mprCloneBuf</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *orig)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Clone a buffer.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a230b37eecf213dc5d714b20e40c91a6c" class="nameRef">mprCloneBufAsString</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *bp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Clone a buffer contents.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1afb83550acf891b29144a0133c3d36897" class="nameRef">mprCloneBufMem</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *bp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Clone a buffer contents.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_key" class="ref">MprKey</a> MprHash,*</td><td><a href="#mpr_8h_1a0e4b242b3211bdc24c17d1c83ef77ad2" class="nameRef">mprCloneHash</a>(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Copy a hash table.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_json" class="ref">MprJson</a> *</td><td><a href="#mpr_8h_1a641a4ab69ff947e50c8bd6763a3b9e9f" class="nameRef">mprCloneJson</a>(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Clone a JSON object.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_list" class="ref">MprList</a> *</td><td><a href="#mpr_8h_1a177c262ad7aec553d0ba5a3925aeddb5" class="nameRef">mprCloneList</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *src)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Clone a list and all elements.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_socket" class="ref">MprSocket</a> *</td><td><a href="#mpr_8h_1a86f9e7d6fa1e7bea6d16720a4873c7f7" class="nameRef">mprCloneSocket</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Clone a socket object.</td></tr>
<tr class="apiDef"><td class="apiType">struct MprSsl *</td><td><a href="#mpr_8h_1a2fd29640fe5c0d10b45ba8e7fbba5bc2" class="nameRef">mprCloneSsl</a>(<a href="#struct_mpr_ssl" class="ref">MprSsl</a> *src)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create the a new SSL control structure based on an existing structure.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1ac48a59b1bfc4f3944a88e152863c3d32" class="nameRef">mprCloseCmdFd</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, int channel)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Close the command channel.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1abed0e8f716912b0f4e928c32480a0c06" class="nameRef">mprCloseFile</a>(<a href="#struct_mpr_file" class="ref">MprFile</a> *file)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Close a file.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a5bd6e40cb8a29c92a8f5e1ce9529b726" class="nameRef">mprCloseSocket</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> graceful)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Close a socket.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1aab2501188e2f3f59008f8f27e14732e9" class="nameRef">mprCompactBuf</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Compact the buffer contents.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a087ffc47d75b5f88dbfcabb8c3cd2d21" class="nameRef">mprCompareTime</a>(<a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="ref">MprTime</a> t1, <a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="ref">MprTime</a> t2)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Compare two times.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a7157efc602b90ef7786eb89d31ffa6f7" class="nameRef">mprConnectSocket</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ip, int port, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Connect a client socket.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a9d17735f686e0bc754343253795d79ac" class="nameRef">mprCopyListContents</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *dest, <a href="#struct_mpr_list" class="ref">MprList</a> *src)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Copy list contents.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a358d2532cd4fe229f4118ca181b4b721" class="nameRef">mprCopyPath</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *from, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *to, int omode)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Copy a file.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr" class="ref">Mpr</a> *</td><td><a href="#mpr_8h_1a000f7f94708664e292b1bddeb69a7996" class="nameRef">mprCreate</a>(int argc, char **argv, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Initialize the application by creating an instance of the MPR.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_buf" class="ref">MprBuf</a> *</td><td><a href="#mpr_8h_1a9de0736b6967e4569192d230f16b8d71" class="nameRef">mprCreateBuf</a>(<a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> initialSize, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> maxSize)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a new buffer.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_cache" class="ref">MprCache</a> *</td><td><a href="#mpr_8h_1a723be1009e7b9cd130cc53f2f3545e94" class="nameRef">mprCreateCache</a>(int options)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a new cache object.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a8e4a26f0e48b79a6ae677c97040ccf0c" class="nameRef">mprCreateCacheService</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Initialize the cache service on startup.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_cmd" class="ref">MprCmd</a> *</td><td><a href="#mpr_8h_1a707b8f9bc8cf13f3a4d9c463f93b5487" class="nameRef">mprCreateCmd</a>(<a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a new Command object.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_cond" class="ref">MprCond</a> *</td><td><a href="#mpr_8h_1a563cf7257bd5ed5d1024cd457bae598f" class="nameRef">mprCreateCond</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a condition lock variable.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#mpr_8h_1ab609e9e7685d987a32bd0040f2ad6adf" class="ref">MprDiskFileSystem</a> *</td><td><a href="#mpr_8h_1af056d41b7726fec58ee0381773d2d7df" class="nameRef">mprCreateDiskFileSystem</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create and initialize the disk FileSystem.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *</td><td><a href="#mpr_8h_1a1da72b3760024ca15d93ade76de8e33a" class="nameRef">mprCreateDispatcher</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a new event dispatcher.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_event" class="ref">MprEvent</a> *</td><td><a href="#mpr_8h_1abdf25e12b2bcc5c116599b639cc18d5c" class="nameRef">mprCreateEvent</a>(<a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> period, void *proc, void *data, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Queue an new event on a dispatcher.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_hash" class="ref">MprHash</a> *</td><td><a href="#mpr_8h_1a18bd67b1021247082ff8e853966dc361" class="nameRef">mprCreateHash</a>(int hashSize, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a hash table.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_hash" class="ref">MprHash</a> *</td><td><a href="#mpr_8h_1a684b4ca5b08405b88c5f71c2806c99aa" class="nameRef">mprCreateHashFromWords</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a hash of words.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a6d3a70c7850c5aead6509818ab784b2f" class="nameRef">mprCreateIOEvent</a>(<a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher, void *proc, void *data, struct MprWaitHandler *wp, struct MprSocket *sock)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create and queue an IO event for a wait handler.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_json" class="ref">MprJson</a> *</td><td><a href="#mpr_8h_1adece02d2e6bb191f587261f527aacdbe" class="nameRef">mprCreateJson</a>(int type)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a JSON object.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_json" class="ref">MprJson</a> *</td><td><a href="#mpr_8h_1adbc11d4801dcb3fbcfd2243d23ee29b1" class="nameRef">mprCreateJsonValue</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value, int type)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a JSON object value.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_key_value" class="ref">MprKeyValue</a> *</td><td><a href="#mpr_8h_1aa32ad3675623f779762d9580de7dccec" class="nameRef">mprCreateKeyPair</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a key / value pair.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_list" class="ref">MprList</a> *</td><td><a href="#mpr_8h_1aad013e1bb3447a42920f013eceebf174" class="nameRef">mprCreateList</a>(int size, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a list.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_list" class="ref">MprList</a> *</td><td><a href="#mpr_8h_1af5902c7c695d6dac07e0847854f01174" class="nameRef">mprCreateListFromWords</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a list of words.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_event" class="ref">MprEvent</a> *</td><td><a href="#mpr_8h_1a62dcab1168ef4f4521a9120310872750" class="nameRef">mprCreateLocalEvent</a>(<a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> period, void *proc, void *data, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Optimized variety of mprCreateEvent for use by local MPR threads only.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_mutex" class="ref">MprMutex</a> *</td><td><a href="#mpr_8h_1a1c8cb9039500adccdfab41502d1b51f0" class="nameRef">mprCreateLock</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a Mutex lock object.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1ae45b44716c1a7a18e19dbc248d41fbce" class="nameRef">mprCreateLogService</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Initialize the log service.</td></tr>
<tr class="apiDef"><td class="apiType">struct Mpr *</td><td><a href="#mpr_8h_1a89524cfbcea2fc955ae583ac90e53368" class="nameRef">mprCreateMemService</a>(<a href="#mpr_8h_1ad5e84d898dd29853b54cc1b49fcb4041" class="ref">MprManager</a> manager, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create and initialize the Memory service.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_hash" class="ref">MprHash</a> *</td><td><a href="#mpr_8h_1aa2c27762b461480e0fa9e8e5090e0d66" class="nameRef">mprCreateMimeTypes</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create the mime types.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_module" class="ref">MprModule</a> *</td><td><a href="#mpr_8h_1a35f4f35014f5601bb37ba7bbfcac62be" class="nameRef">mprCreateModule</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *entry, void *data)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a module.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_module_service" class="ref">MprModuleService</a> *</td><td><a href="#mpr_8h_1a5b4d1daf88d69ef0609140ba1245e333" class="nameRef">mprCreateModuleService</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create and initialize the module service.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a8aa37eb2e397ec2d78e6df15a0d303c5" class="nameRef">mprCreateNotifierService</a>(<a href="#struct_mpr_wait_service" class="ref">MprWaitService</a> *ws)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Internal.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1af3272904f3223b0a7e90967c5d7fd3cd" class="nameRef">mprCreateOsService</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create and initialze the O/S dependent subsystem.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_rom_file_system" class="ref">MprRomFileSystem</a> *</td><td><a href="#mpr_8h_1a84ae1c2805746ecb946f3bb7f65107c0" class="nameRef">mprCreateRomFileSystem</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="#struct_mpr_rom_inode" class="ref">MprRomInode</a> *inodes)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create and initialize the ROM FileSystem.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_socket" class="ref">MprSocket</a> *</td><td><a href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0" class="nameRef">mprCreateSocket</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a socket.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_spin" class="ref">MprSpin</a> *</td><td><a href="#mpr_8h_1a5c274c45a6ecaeb4fed542a9f74a6fc6" class="nameRef">mprCreateSpinLock</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a spin lock lock object.</td></tr>
<tr class="apiDef"><td class="apiType">struct MprSsl *</td><td><a href="#mpr_8h_1af8c1ae4171f8591e9ca89eb02aeedaa8" class="nameRef">mprCreateSsl</a>(int server)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create the SSL control structure.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_thread" class="ref">MprThread</a> *</td><td><a href="#mpr_8h_1afad5f424b850bf2aa9f995f6c0a62fc1" class="nameRef">mprCreateThread</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, void *proc, void *data, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> stackSize)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a new thread.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a7470862a8c3db1e0ffcd83ad12a512be" class="nameRef">mprCreateTimeService</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td><a class="ref" href="#struct_mpr">Mpr</a> time structure.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_event" class="ref">MprEvent</a> *</td><td><a href="#mpr_8h_1a8fb1ca3773c88a3bb9c1bddaf63ada99" class="nameRef">mprCreateTimerEvent</a>(<a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> period, void *proc, void *data, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a timer event.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_wait_handler" class="ref">MprWaitHandler</a> *</td><td><a href="#mpr_8h_1a90c04576c4f4f15dee8b118f2e53ed63" class="nameRef">mprCreateWaitHandler</a>(int fd, int mask, <a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher, void *proc, void *data, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a wait handler.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a6e446e242befb2f9d4b64dabef755c21" class="nameRef">mprCryptPassword</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *password, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *salt, int rounds)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Encrypt a password using the Blowfish algorithm.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a6ef562d3d273642db1405daaa65c04e9" class="nameRef">mprDaemon</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Convert the process into a daemon on unix systems.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a08742c4a5b8340886661acd20827b12c" class="nameRef">mprDebug</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *tags, int level, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Write a log message to the log file when the product is built in debug mode.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a0baa25ccc4220f5a64804cfc50c4b394" class="nameRef">mprDecode64</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Decode a null terminated string using base-46 encoding.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1acf9eabca8a83df96d80c45e0384520b5" class="nameRef">mprDecode64Block</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> *len, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Decode a null terminated string using base-46 encoding.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a1e078d6a9ff6fca1fc5cf3653264aa57" class="nameRef">mprDecodeLocalTime</a>(struct tm *timep, <a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="ref">MprTime</a> time)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Decode a time value into a tokenized local time value.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1ad52cfde22b75a620147b661f796ba8dc" class="nameRef">mprDecodeUniversalTime</a>(struct tm *timep, <a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="ref">MprTime</a> time)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Decode a time value into a tokenized UTC time structure.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a7fe4c3fb94490eb462405d86f71514d7" class="nameRef">mprDedicateWorker</a>(<a href="#struct_mpr_worker" class="ref">MprWorker</a> *worker)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Dedicate a worker thread to a current real thread.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1aac0f2dcab7c919a6b66ee992d8b087bf" class="nameRef">mprDefaultLogHandler</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *tags, int level, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *msg)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Default MPR log handler.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a411af02ac646daeb80cd31eb54606976" class="nameRef">mprDeletePath</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Delete a file.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_hash" class="ref">MprHash</a> *</td><td><a href="#mpr_8h_1a0fedb9de853c1233287840a4eab73f0a" class="nameRef">mprDeserialize</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Deserialize a simple JSON string and return a hash of properties.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_hash" class="ref">MprHash</a> *</td><td><a href="#mpr_8h_1a2ad1855cadbeed70b3dd6c6a677cc783" class="nameRef">mprDeserializeInto</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="#struct_mpr_hash" class="ref">MprHash</a> *hash)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Deserialize a simple JSON string into the given hash object.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a4f36e049582f33f7384fd5648db77a2a" class="nameRef">mprDestroy</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Destroy the MPR and all services using the MPR.</td></tr>
<tr class="apiDef"><td class="apiType">void *</td><td><a href="#mpr_8h_1a9d65a430a441e5ea99ac123c64e6d750" class="nameRef">mprDestroyCache</a>(<a href="#struct_mpr_cache" class="ref">MprCache</a> *cache)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Destroy a new cache object.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1aa6cedd25447b88aa144bc50fdcec6951" class="nameRef">mprDestroyCmd</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Destroy the command.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1afd35a965e3ebadc852b8b02aace7a08e" class="nameRef">mprDestroyDispatcher</a>(<a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Disable a dispatcher from service events.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1ae7af42e3a8ef70c3a9f6879b91e0697d" class="nameRef">mprDestroyWaitHandler</a>(<a href="#struct_mpr_wait_handler" class="ref">MprWaitHandler</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Destroy a wait handler.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a66cccaaaa550e9d2cf381ff8854c2d7a" class="nameRef">mprDisableCmdEvents</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, int channel)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Disable command I/O events.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a457be50126337e42f1df6c30af9db510" class="nameRef">mprDisableFileBuffering</a>(<a href="#struct_mpr_file" class="ref">MprFile</a> *file)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Disable file buffering.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a7562126cafba57260cd73634f1ee4aed" class="nameRef">mprDisconnectCmd</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Disconnect a command its underlying I/O channels.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a5f9301dbcddf9d1a62b40c69bc67fe40" class="nameRef">mprDisconnectSocket</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Disconnect a socket by closing its underlying file descriptor.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1abe3cfb3803a928b435c9af5d46b61fb0" class="nameRef">mprEmptyString</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Reference to a permanent preallocated empty string.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a2fd38e2aaf8e7c2a1aed39aa1005155e" class="nameRef">mprEnableCmdEvents</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, int channel)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Enable command I/O events.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a39d49294df1ae6d358c30e958585e060" class="nameRef">mprEnableCmdOutputEvents</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> on)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Enable command I/O events for the command&apos;s STDOUT and STDERR channels.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1ac9e97afd0732f2d3612d911817357db5" class="nameRef">mprEnableContinuousEvent</a>(<a href="#struct_mpr_event" class="ref">MprEvent</a> *event, int enable)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Enable or disable an event being continous.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a04cace2622f3cfe7e8e9ee32bffb12da" class="nameRef">mprEnableFileBuffering</a>(<a href="#struct_mpr_file" class="ref">MprFile</a> *file, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> maxSize)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Enable file buffering.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a4e34537a9123922eb0bac5e9844c68b1" class="nameRef">mprEnableGC</a>(<a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> on)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Enable or disable the garbage collector.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a76ee7ac0bfb59b23680a835d7ac03854" class="nameRef">mprEnableSocketEvents</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, int mask)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Enable socket events for a socket callback.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a0800d67d2b12aff346dfae654edb23a9" class="nameRef">mprEncode64</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Encode a string using base-46 encoding.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a39db4cc703d330584cb7932a1a870eeb" class="nameRef">mprEncode64Block</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Encode buffer using base-46 encoding.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1a97cfa9d651a30ee3699b050b4a3644e0" class="nameRef">mprEprintf</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...) PRINTF_ATTRIBUTE(1</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Print a formatted message to the standard error channel.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a3e8ec0097e4869fe9847da2c3b0eca48" class="nameRef">mprError</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...) PRINTF_ATTRIBUTE(1</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Log an error message.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a9ea6502e39da67e59f1f11f808ec02b3" class="nameRef">mprEscapeCmd</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *cmd, int escChar)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Encode a string escaping typical command (shell) characters.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1ae4da13f321d8efb672ed9608402b037c" class="nameRef">mprEscapeHtml</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *html)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Encode a string by escaping typical HTML characters.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1ade3a3fe123f14ed1d7b9c0e0ecf0e913" class="nameRef">mprEscapeSQL</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *cmd)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Encode a string by escaping SQL special characters.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a64c71c8b8c3abc909af87253b811da9e" class="nameRef">mprExpireCacheItem</a>(<a href="#struct_mpr_cache" class="ref">MprCache</a> *cache, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> expires)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the expiry date for a cache item.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1ac28276b68838d380698c4995fc9b1267" class="nameRef">mprFinalizeCmd</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Finalize the writing of data to the command process.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a453b62a6659fc9fa4d041165dad7461e" class="nameRef">mprFlushBuf</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Flush the buffer contents.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a957f3c3051214ee8f105047fee84bc11" class="nameRef">mprFlushFile</a>(<a href="#struct_mpr_file" class="ref">MprFile</a> *file)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Flush any buffered write data.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1acd099834cea11479ab5a5ef542bfcaac" class="nameRef">mprFlushSocket</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Flush a socket.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a127b29058e44088f4ce2088d7b0279b8" class="nameRef">mprFormatJsonName</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Format a JSON name into and output buffer.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a840846c8502938332a1cb0ed6afcd0fa" class="nameRef">mprFormatJsonString</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Format a string as a JSON string.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a3518a6d456b78435f0e021bfdf81830a" class="nameRef">mprFormatJsonValue</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, int type, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Format a value as a simple JSON string.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a00f1d24d71418a0abafc2ff104f23609" class="nameRef">mprFormatLocalTime</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, <a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="ref">MprTime</a> time)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Convert a time value to local time and format as a string.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a4480b487cb113986815b59c1b4d5b2cf" class="nameRef">mprFormatTm</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, struct tm *timep)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Format a time value as a local time.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a57707eeefe16eca1ca909576c7ebd7e4" class="nameRef">mprFormatUniversalTime</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, <a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="ref">MprTime</a> time)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Convert a time value to universal time and format as a string.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> ssize</td><td><a href="#mpr_8h_1ac291f492ca21c6576cf5cfcb1662f0c2" class="nameRef">mprFprintf</a>(struct MprFile *file, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...) PRINTF_ATTRIBUTE(2</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Print a formatted message to a file descriptor.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a748a0f879d3b5ce8cb8eb23b01392552" class="nameRef">mprGC</a>(int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Collect garbage.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a080fbccb95ae7cf32175d3218b903389" class="nameRef">mprGetAbsPath</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Convert a path to an absolute path.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1a2ad40e5d26b04cff98854958a6584170" class="nameRef">mprGetActiveCmdCount</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the count of active commands.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *</td><td><a href="#mpr_8h_1a7d3003f3b50a50276f8643e51860e5c3" class="nameRef">mprGetAppDir</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the application directory.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *</td><td><a href="#mpr_8h_1ad74c6620549f5cc262ab0e19f7b89e06" class="nameRef">mprGetAppName</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the application name defined via mprSetAppName.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *</td><td><a href="#mpr_8h_1a1a448850bac399919424976a69e0ac87" class="nameRef">mprGetAppPath</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the application executable path.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *</td><td><a href="#mpr_8h_1a18dfbba3def279be7d964caf6406aa28" class="nameRef">mprGetAppTitle</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the application title string.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *</td><td><a href="#mpr_8h_1ac8a0abeb29a70859022071c5d1d9625a" class="nameRef">mprGetAppVersion</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the application version string.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1a142b9eecd08dac10c50cd705045ddb80" class="nameRef">mprGetBlockFromBuf</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, char *blk, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> count)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get a block of data from the buffer.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a></td><td><a href="#mpr_8h_1a4c9028aba8f82b48191035aa3a191d81" class="nameRef">mprGetBlockSize</a>(<a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the allocated size of a memory block.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a10dfa79a5b91b7bc543a806404e5ee07" class="nameRef">mprGetBuf</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the origin of the buffer content storage.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a500adc201f3219c2ce8d5f79aafabf68" class="nameRef">mprGetBufEnd</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get a reference to the end of the buffer contents.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1aa543b610b67691faf917b4b79229fc34" class="nameRef">mprGetBufLength</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the buffer content length.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#mpr_8h_1ac1eae8096b0311d63a3fba54015bf1b9" class="ref">MprBufProc</a></td><td><a href="#mpr_8h_1a2791daeb72ae2e3f455250dfba72aa67" class="nameRef">mprGetBufRefillProc</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the buffer refill procedure.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1a0cbdbaf59392b9f7a77997c450117c87" class="nameRef">mprGetBufSize</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the current size of the buffer content storage.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1a31a2c76bb862de4e47ffb2231b106c98" class="nameRef">mprGetBufSpace</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the space available to store content.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a1e6d26702f1d5cf253c623e9e798df65" class="nameRef">mprGetBufStart</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the start of the buffer contents.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1a92854bbee90e9a17e0e9a4718300b53f" class="nameRef">mprGetBusyWorkerCount</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the count of workers in the busy queue.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a151d6b4fc026bbbf0b057d78f2543f50" class="ref">uint64</a></td><td><a href="#mpr_8h_1a7cfff7f39e0ea544eded730c1aee2306" class="nameRef">mprGetCPU</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Return the process CPU usage.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a4eecd5e609a315224aed035c3351d836" class="nameRef">mprGetCacheStats</a>(<a href="#struct_mpr_cache" class="ref">MprCache</a> *cache, int *numKeys, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> *mem)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the Cache statistics.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1af128b71005bdd12507110e1f21b483d4" class="nameRef">mprGetCharFromBuf</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get a character from the buffer.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_buf" class="ref">MprBuf</a> *</td><td><a href="#mpr_8h_1ae85d70142c3176988a699d77d0d7db30" class="nameRef">mprGetCmdBuf</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, int channel)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the underlying buffer for a channel.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1af75f9ee1ad6ce783f18263761fde73c3" class="nameRef">mprGetCmdExitStatus</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the command exit status.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1ab286ce3b057579a16b84ec56997ae63f" class="nameRef">mprGetCmdFd</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, int channel)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the underlying file descriptor for an I/O channel.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a06742ab6e80eb33573632ca502ae2c16" class="nameRef">mprGetCmdlineLogging</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get if command line logging is being used.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#mpr_8h_1a7c5ca1c1ea9197509c0e60d9f6a8fed7" class="ref">MprOsThread</a></td><td><a href="#mpr_8h_1a9db7204c54785784352bb1ee492fadab" class="nameRef">mprGetCurrentOsThread</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the O/S thread.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *</td><td><a href="#mpr_8h_1ab907f78a9b83d696751f6cbb61166e22" class="nameRef">mprGetCurrentPath</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Return the current working directory.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_thread" class="ref">MprThread</a> *</td><td><a href="#mpr_8h_1a9b441f06f8eae7eaebcba6d35bfa3a48" class="nameRef">mprGetCurrentThread</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the currently executing thread.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *</td><td><a href="#mpr_8h_1a3cba09b91b830934fbe9deee2be61f49" class="nameRef">mprGetCurrentThreadName</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Return the name of the current thread.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_worker" class="ref">MprWorker</a> *</td><td><a href="#mpr_8h_1a14edad55ccffaf94ae988e36ac793675" class="nameRef">mprGetCurrentWorker</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the worker object if the current thread is actually a worker thread.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a07a8f789f0873dff5de3a4e3e51b7956" class="nameRef">mprGetDate</a>(char *fmt)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get a string representation of the current date/time.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1aad943db137f5906883e08af68d3436b8" class="nameRef">mprGetDebugMode</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the debug mode.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *</td><td><a href="#mpr_8h_1a58f8c69c9dd399c2e17be36dd5412e88" class="nameRef">mprGetDispatcher</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the MPR primary dispatcher.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *</td><td><a href="#mpr_8h_1af885fc9c79401476c95bfdb53996efdd" class="nameRef">mprGetDomainName</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the application domain name string.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a></td><td><a href="#mpr_8h_1a1f88b37382ba7d2e48289415df0383ea" class="nameRef">mprGetElapsedTicks</a>(<a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> mark)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the elapsed time since a ticks mark.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="ref">MprTime</a></td><td><a href="#mpr_8h_1a56c79ce10b54876dc9488694039a3ea9" class="nameRef">mprGetElapsedTime</a>(<a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="ref">MprTime</a> mark)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the elapsed time since a starting time mark.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1adb6c109b9a562ddbba0fcc9acb15c862" class="nameRef">mprGetEndian</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Return the endian byte ordering for the application.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1aeecae95080f23d6052020b6f16ec7b92" class="nameRef">mprGetError</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Return the error code for the most recent system or library operation.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a></td><td><a href="#mpr_8h_1a85ab494f065b00d321a75512ebdc1219" class="nameRef">mprGetEventMark</a>(<a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get an event mark for a dispatcher.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a6dcbec55f8e4ba71d582bf0308ee7acd" class="nameRef">mprGetExitStatus</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the exit status.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1aef84e97dcc3d31210a7a234a03ac3366" class="nameRef">mprGetFileChar</a>(<a href="#struct_mpr_file" class="ref">MprFile</a> *file)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Read a character from the file.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1af103e93995d60cca6b94f15b2e77e19f" class="nameRef">mprGetFileFd</a>(<a href="#struct_mpr_file" class="ref">MprFile</a> *file)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the file descriptor for a file.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#mpr_8h_1a87e9f435008723c7b1489af1944c6e20" class="ref">MprOff</a></td><td><a href="#mpr_8h_1a437b7eb30b31d38fcedef0aa8617edcc" class="nameRef">mprGetFilePosition</a>(<a href="#struct_mpr_file" class="ref">MprFile</a> *file)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Return the current file position.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#mpr_8h_1a87e9f435008723c7b1489af1944c6e20" class="ref">MprOff</a></td><td><a href="#mpr_8h_1a29b58b84303a5345e9cc69bb320fc500" class="nameRef">mprGetFileSize</a>(<a href="#struct_mpr_file" class="ref">MprFile</a> *file)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the size of the file.</td></tr>
<tr class="apiDef"><td class="apiType">void *</td><td><a href="#mpr_8h_1a34cb920bcebf2bf6559a50b68788f74b" class="nameRef">mprGetFirstItem</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the first item in the list.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_key" class="ref">MprKey</a> *</td><td><a href="#mpr_8h_1a0604f7e2cf28a39f0fa608f2365ae426" class="nameRef">mprGetFirstKey</a>(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Return the first symbol in a symbol entry.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *</td><td><a href="#mpr_8h_1a52796d1fca3bdd2ff93a0641d5ce4ea4" class="nameRef">mprGetFirstPathSeparator</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the first path separator in a path.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a2c078b228b88412f5d922e45c9002c5c" class="nameRef">mprGetHashLength</a>(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Return the count of symbols in a symbol entry.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a151d6b4fc026bbbf0b057d78f2543f50" class="ref">uint64</a></td><td><a href="#mpr_8h_1a593854e3645e9587bca0daf66bccddf4" class="nameRef">mprGetHiResTicks</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the CPU tick count.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *</td><td><a href="#mpr_8h_1a846bf5ed140accc0a52f33919a32e0da" class="nameRef">mprGetHostName</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the application host name string.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *</td><td><a href="#mpr_8h_1a3657b2c77af0992419809b0d97aa05db" class="nameRef">mprGetIpAddr</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the application IP address string.</td></tr>
<tr class="apiDef"><td class="apiType">void *</td><td><a href="#mpr_8h_1a7fd7e14f0616cb9802638d654678bf0b" class="nameRef">mprGetItem</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list, int index)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get an list item.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *</td><td><a href="#mpr_8h_1a559d9a940422ebfa981b1cf51f72020d" class="nameRef">mprGetJson</a>(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get a JSON key and return a string value.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1a96b8f4d7945990fc3f2a942af43cab32" class="nameRef">mprGetJsonLength</a>(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the number of child properties in a JSON object.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_json" class="ref">MprJson</a> *</td><td><a href="#mpr_8h_1a05e2cff598f473615cb1ef4b82dcfd31" class="nameRef">mprGetJsonObj</a>(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get a parsed JSON object for a key value.</td></tr>
<tr class="apiDef"><td class="apiType">void *</td><td><a href="#mpr_8h_1a6d6062cbf99035bfb7f9f3667342506a" class="nameRef">mprGetKey</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get a key value.</td></tr>
<tr class="apiDef"><td class="apiType">void *</td><td><a href="#mpr_8h_1ad52b353a178af2cee98aedfef0aa7988" class="nameRef">mprGetLastItem</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the last item in the list.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1ac47331b3442493d84405d32ffcb98aba" class="nameRef">mprGetListCapacity</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the current capacity of the list.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a4c19ca9f47bf98e133716c174f225f54" class="nameRef">mprGetListLength</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the number of items in the list.</td></tr>
<tr class="apiDef"><td class="apiType">void struct MprFile *</td><td><a href="#mpr_8h_1aa06509c35e52b3873c34586d6986a343" class="nameRef">mprGetLogFile</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the log file object.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#mpr_8h_1a8fdb97b78014d2a084a4747a35b3235a" class="ref">MprLogHandler</a></td><td><a href="#mpr_8h_1a793de5b45b6675f852c98d3127e5dc24" class="nameRef">mprGetLogHandler</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the current MPR debug log handler.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a4cfc9b704aa9db3e8f46e07a6eb7119a" class="nameRef">mprGetLogLevel</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the current logging level.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a8962a0650385fc6a6efcc8b1d606fe47" class="nameRef">mprGetMD5</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get an MD5 checksum.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a5c59cd24665cae7c85b0578f2fb6b94a" class="nameRef">mprGetMD5WithPrefix</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *prefix)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get an MD5 checksum with optional prefix string and buffer length.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1ae4ec7b83f3094b71025fe605a1bcf2dc" class="nameRef">mprGetMaxWorkers</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the maximum count of worker pool threads Get the maximum limit of worker pool threads.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a></td><td><a href="#mpr_8h_1a279d76fb52ed630587e1e97612172a5c" class="nameRef">mprGetMem</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Return the amount of memory currently used by the application.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_mem_stats" class="ref">MprMemStats</a> *</td><td><a href="#mpr_8h_1a99dc8d54f9cf15941879227b4029e8b4" class="nameRef">mprGetMemStats</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Return the current allocation memory statistics block.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *</td><td><a href="#mpr_8h_1a0546da53b26c8a264b778b07461746c0" class="nameRef">mprGetMimeProgram</a>(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *mimeType)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the mime type program for a given mimeType.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *</td><td><a href="#mpr_8h_1a0e9b22f07aca1f18bcad2e73147a5de3" class="nameRef">mprGetModuleSearchPath</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the module search path.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr" class="ref">Mpr</a> *</td><td><a href="#mpr_8h_1add3d2fbe6368f4e0eecb870c22e96d32" class="nameRef">mprGetMpr</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Return the MPR control instance.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a329900c5d80145667270dbe8e471b011" class="nameRef">mprGetNativePath</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get a path formatted according to the native O/S conventions.</td></tr>
<tr class="apiDef"><td class="apiType">void *</td><td><a href="#mpr_8h_1ab8c4852b9d8de93f10389b6caa326011" class="nameRef">mprGetNextItem</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list, int *lastIndex)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the next item in the list.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_key" class="ref">MprKey</a> *</td><td><a href="#mpr_8h_1a9644a249a4851fabce945c85c2a0965c" class="nameRef">mprGetNextKey</a>(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table, <a href="#struct_mpr_key" class="ref">MprKey</a> *last)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Return the next symbol in a symbol entry.</td></tr>
<tr class="apiDef"><td class="apiType">void *</td><td><a href="#mpr_8h_1a7e7ded5f14780271e8823401d052728e" class="nameRef">mprGetNextStableItem</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list, int *lastIndex)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the next item in a stable list.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a675f57002f372b9c35eba6694b0a1ee8" class="nameRef">mprGetOsError</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Return the O/S error code.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1ae7c3778c00352aea0b3c0b6cfac662e8" class="nameRef">mprGetPageSize</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the current O/S virtual page size.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a67cb15b6180246f71aca64ae75585646" class="nameRef">mprGetPassword</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *prompt)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get a password from the terminal console.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1af232054aa297f7ea84ae264e0b83515b" class="nameRef">mprGetPathBase</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the base portion of a path.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *</td><td><a href="#mpr_8h_1a93bc187df38787243e0e1cbf5d8f6f84" class="nameRef">mprGetPathBaseRef</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get a reference to the base portion of a path.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1affd0f4d195e44639ac6b8c9bd00461c3" class="nameRef">mprGetPathDir</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the directory portion of a path.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a07de4b4d95059c9eb10ff633eef853ea" class="nameRef">mprGetPathExt</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the file extension portion of a path.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_list" class="ref">MprList</a> *</td><td><a href="#mpr_8h_1aa863da10f93cc4c1d06a06f31c54b951" class="nameRef">mprGetPathFiles</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *dir, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a list of files in a directory or subdirectories.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a8792fbc8c7102f46d21fb13403ef576a" class="nameRef">mprGetPathFirstDir</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the first directory portion of a path.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a918a614957a1d6f2a5aba18ef24532c8" class="nameRef">mprGetPathInfo</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="#struct_mpr_path" class="ref">MprPath</a> *info)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Return information about a file represented by a path.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1ab7d843a3c7f004e28658affd89c8fa98" class="nameRef">mprGetPathLink</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the target of a symbolic link.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *</td><td><a href="#mpr_8h_1aa9117a09f9d5a4e6a18c2a502041fbe6" class="nameRef">mprGetPathNewline</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the file newline character string for a given path.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a758289f4a0141c6f8ba27b006212a6a5" class="nameRef">mprGetPathParent</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the parent directory of a path.</td></tr>
<tr class="apiDef"><td class="apiType">char</td><td><a href="#mpr_8h_1ac961e6e514b9a2485d6f957162c7a1e7" class="nameRef">mprGetPathSeparator</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the default path directory separator.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *</td><td><a href="#mpr_8h_1ac7dcdab739f1ee13fb3297b8740f414b" class="nameRef">mprGetPathSeparators</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the path directory separator.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a64dec3a10cd155f04934f878cb41b17c" class="nameRef">mprGetPortablePath</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get a portable path.</td></tr>
<tr class="apiDef"><td class="apiType">void *</td><td><a href="#mpr_8h_1a2238e3929c319d66ffbd5b5ad0d7a180" class="nameRef">mprGetPrevItem</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list, int *lastIndex)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the previous item in the list.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a69984bba38604d0bbc89c6b57ee18bef" class="nameRef">mprGetRandomBytes</a>(char *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size, <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> block)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get some random data.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1ab63903d563f83f3b9a409e3fdc3d06cf" class="nameRef">mprGetRandomString</a>(<a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get some random data in ascii.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1aaeacafb118493798f314f974ba3f6a53" class="nameRef">mprGetRelPath</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *dest, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *origin)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get a path relative to another path.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a></td><td><a href="#mpr_8h_1a431da15c3ff9707b89a7097a85bd90de" class="nameRef">mprGetRemainingTicks</a>(<a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> mark, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Return the time remaining until a timeout has elapsed.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_rom_inode" class="ref">MprRomInode</a> *</td><td><a href="#mpr_8h_1a28e0c914d2e434073968cb04ade38742" class="nameRef">mprGetRomFiles</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the ROM file system data.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1ac779f805db3f7ddafcee6248234e91e8" class="nameRef">mprGetSHA</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get an SHA1 checksum.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1ade1a3d1e6cdf26bf7987d1ddc4744f83" class="nameRef">mprGetSHABase64</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get an SHA1 checksum of a null terminated string.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1aa6e64b64781b25eb761448b81d427fb5" class="nameRef">mprGetSHAWithPrefix</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *prefix)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get an SHA1 checksum with optional prefix string and buffer length.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *</td><td><a href="#mpr_8h_1a55a456488470dd6941f602ddc3ef6be7" class="nameRef">mprGetServerName</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the application server name string.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a8240b2dc5540ae928d19410447c2bab0" class="nameRef">mprGetSocketBlockingMode</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the socket blocking mode.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a64ccf4250b432690a73bb66f0a639f7a" class="nameRef">mprGetSocketError</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get a socket error code.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#mpr_8h_1af9381320a2640ea84038579d8f143c01" class="ref">Socket</a></td><td><a href="#mpr_8h_1a73b28695884ae2db990efa68ae9213ca" class="nameRef">mprGetSocketHandle</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the socket file descriptor.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a0cb09a106e793b09eebbedceaab7f85c" class="nameRef">mprGetSocketInfo</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ip, int port, int *family, int *protocol, struct sockaddr **addr, <a href="#mpr_8h_1a7e81f05ea37d05efc10e7c45c1111d0d" class="ref">Socklen</a> *addrlen)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the socket for an IP:Port address.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1aa4d2f67f80f168a4be7e5f3b96541bab" class="nameRef">mprGetSocketPort</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the port used by a socket.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a27422f971a6b87d52c4c858dcf74fc68" class="nameRef">mprGetSocketState</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the socket state.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1aa272f768c5eeecf6a22181d5eabeea1e" class="nameRef">mprGetState</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the MPR execution state.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_file" class="ref">MprFile</a> *</td><td><a href="#mpr_8h_1a5e4b8209ae5b091161b043a2dfb45186" class="nameRef">mprGetStderr</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Return a file object for the Stderr I/O channel.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_file" class="ref">MprFile</a> *</td><td><a href="#mpr_8h_1aa6a0352318f57f09bf9593abbfe324af" class="nameRef">mprGetStdin</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Return a file object for the Stdin I/O channel.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_file" class="ref">MprFile</a> *</td><td><a href="#mpr_8h_1afddacdfb3b0078d42f936fce928061b2" class="nameRef">mprGetStdout</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Return a file object for the Stdout I/O channel.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a5542317815cb01ecacfd65d9d8ead638" class="nameRef">mprGetTempPath</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *tmpDir)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Make a temporary file.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *</td><td><a href="#mpr_8h_1a62063a19df01cb0845f5365d390e13be" class="nameRef">mprGetThreadName</a>(<a href="#struct_mpr_thread" class="ref">MprThread</a> *thread)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the thread name.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a></td><td><a href="#mpr_8h_1a2d7ac727e81a013671b9a39bb7544145" class="nameRef">mprGetTicks</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the system time.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="ref">MprTime</a></td><td><a href="#mpr_8h_1a874f0ee5e3ec4ea75e4b6c5ac75e83ae" class="nameRef">mprGetTime</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the time.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1ac592bf4081e72d463277963567db5aa4" class="nameRef">mprGetTimeZoneOffset</a>(<a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="ref">MprTime</a> when)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the current timezone offset for a given time.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1adf4522a53e12aed99b2de90642514ff8" class="nameRef">mprGetWinPath</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Convert a path to an absolute windows path.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1ada34402b39990eab1ff9d55d9e271076" class="nameRef">mprGetWorkerStats</a>(<a href="#struct_mpr_worker_stats" class="ref">MprWorkerStats</a> *stats)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the Worker service statistics.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_list" class="ref">MprList</a> *</td><td><a href="#mpr_8h_1a2f20d99a934d49a8decce59928e40add" class="nameRef">mprGlobPathFiles</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *patterns, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a list of files in a directory or subdirectories that match the given wildcard pattern.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a393f36fdfba1bf0b17a7df289c1eae29" class="nameRef">mprGlobalLock</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Globally lock the application.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1aeaf0a9ee6fe651307aa4c8d8061cdbd4" class="nameRef">mprGlobalUnlock</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Unlock the global mutex.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a00b4c52b236de298af2ac5047bab6e57" class="nameRef">mprGrowBuf</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> count)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Grow the buffer.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1ab74682f4b1d74e4dd032eee73800e68f" class="nameRef">mprHasDualNetworkStack</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>has the system got a dual IPv4 + IPv6 network stack.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1ab41059d0eacfb553ab7697c970fbebdb" class="nameRef">mprHasIPv6</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Determine if the system support IPv6.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a88bd0a2f9a3d1fb30b5a2117375d00b3" class="nameRef">mprHasMemError</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Determine if the MPR has encountered memory allocation errors.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1abcaf311da2303180d2fb24c35c629580" class="nameRef">mprHasSecureSockets</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Determine if SSL is available.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a0ca4e763d720aa680cd08f60e72bb611" class="nameRef">mprHashKeysToString</a>(<a href="#struct_mpr_hash" class="ref">MprHash</a> *hash, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *join)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Convert hash keys to a single string.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_json" class="ref">MprJson</a> *</td><td><a href="#mpr_8h_1a1b97fba4dcfc54fba334b3ebfd92bb22" class="nameRef">mprHashToJson</a>(<a href="#struct_mpr_hash" class="ref">MprHash</a> *hash)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Convert a hash object into a JSON object.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1aa4f0e9abc480e2690755f31783323434" class="nameRef">mprHashToString</a>(<a href="#struct_mpr_hash" class="ref">MprHash</a> *hash, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *join)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Convert a hash of strings to a single string.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1ae5d78c44aca7282c6c5b85dc5b4f162e" class="nameRef">mprHiddenSocketData</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len, int dir)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Indicate that the application layer has buffered data for the socket.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1aac8a75ae42130538e13d4e84ccb030f4" class="nameRef">mprHold</a>(<a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Hold a memory block.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a5d4c4bb8ea12d82c3170354c43ac4ab6" class="nameRef">mprHoldBlocks</a>(<a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr, ...)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Hold memory blocks.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a></td><td><a href="#mpr_8h_1a217793852b371ff5520edc80bc64358c" class="nameRef">mprIncCache</a>(<a href="#struct_mpr_cache" class="ref">MprCache</a> *cache, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> amount)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Increment a numeric cache item.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a418af9ccff881e2d7671b7c4c54099fb" class="nameRef">mprInitFileSystem</a>(<a href="#struct_mpr_file_system" class="ref">MprFileSystem</a> *fs, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create and initialize the FileSystem subsystem.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a0c797a3ea868662ad6dabb35f5255399" class="nameRef">mprInitList</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Initialize a list structure.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_mutex" class="ref">MprMutex</a> *</td><td><a href="#mpr_8h_1ac2c7afe9194b40008b0bfaf383ba7fce" class="nameRef">mprInitLock</a>(<a href="#struct_mpr_mutex" class="ref">MprMutex</a> *mutex)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Initialize a statically allocated Mutex lock object.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_spin" class="ref">MprSpin</a> *</td><td><a href="#mpr_8h_1aa98804877c521536f8b3be4e90e9016d" class="nameRef">mprInitSpinLock</a>(<a href="#struct_mpr_spin" class="ref">MprSpin</a> *lock)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Initialize a statically allocated spinlock object.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a6f91b177cd36508c9d470636b04fa7b5" class="nameRef">mprInsertCharToBuf</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, int c)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Insert a character into the buffer.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1af3e8599ae4707459cf42ad960256af98" class="nameRef">mprInsertItemAtPos</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list, int index, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *item)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Insert an item into a list at a specific position.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1abea3b21605554425877eeb496cb5991c" class="nameRef">mprIsAbsPathContained</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *dir)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Fast version of mprIsPathContained that works only for absolute paths.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a265a266b3c9f354009c225c9a2f1c75d" class="nameRef">mprIsCmdComplete</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if a command is complete.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a5ac545e5959e115b2cd633004f5d949b" class="nameRef">mprIsCmdRunning</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if the command is still running.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1affaa2a3bb2f99575faf2f5d3204b2d8d" class="nameRef">mprIsDestroyed</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Determine if the MPR has finished.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a752248cc6a0c0933c657ebdf505402be" class="nameRef">mprIsDestroying</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if the application is terminating and core services are being destroyed All request should immediately terminate.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1aec9134c334a714e44c62396c88a012c9" class="nameRef">mprIsIPv6</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ip)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Determine if the IP address is an IPv6 address.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1aa07c03ff5f586d99e46ad8bc7b519eba" class="nameRef">mprIsIdle</a>(<a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> traceRequests)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Determine if the App is idle.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a00cde73edc55911e4ba714f445544502" class="nameRef">mprIsInfinite</a>(double value)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if a double value is infinte.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a05a04872e6d51bca40b2223e466984b7" class="nameRef">mprIsNan</a>(double value)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if a double value is not-a-number.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a2049719abeb04bb8cc89e89dbc8ad4aa" class="nameRef">mprIsPathAbs</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Determine if a path is absolute.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1af9bf23ba3a4c680f860f8d392b17576c" class="nameRef">mprIsPathContained</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *dir)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Determine if a directory is the same as or a parent of a path.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a3e583d5b6b29cdc5cf686802c2ca40f3" class="nameRef">mprIsPathDir</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Determine if a path is a directory.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a932b2591cfd0deda28a559c9286800ba" class="nameRef">mprIsPathRel</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Determine if a path is relative.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a4328cbd16ad63b5ddcfa1db28192a53c" class="nameRef">mprIsPathSeparator</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> c)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if a character is a path separarator.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a122966f272c5d7d00bab8f66d569d362" class="nameRef">mprIsSocketEof</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if the other end of the socket has been closed.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1abeeb5c489632e55d36e2139f8ac0f423" class="nameRef">mprIsSocketSecure</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Determine if the socket is secure.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a9077f7fb7f0b3ab411af60dca7324da3" class="nameRef">mprIsSocketV6</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Determine if the socket is using IPv6 Currently only works for server side addresses.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a144b28996361aeeb00e9948945d210b7" class="nameRef">mprIsStopped</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if the application is stopped If this routine returns true, the application shutdown has passed the point of no return.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a7e84dffeb346754ceff2fff74da87bc6" class="nameRef">mprIsStopping</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if the application is stopping If mprIsStopping is true, the application has commenced a shutdown.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a60f5c1f8065e2d164160fbc71275d300" class="nameRef">mprIsValid</a>(<a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test is a pointer is a valid memory context.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1afb9eede8122d445daefbadd3122bba42" class="nameRef">mprIsZero</a>(double value)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if a double value is zero.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1acdda62c3b86f55ac5fb8aeb7577e793a" class="nameRef">mprJoinPath</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *base, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Join paths.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1af830a34e57be320edb599e4b531d74da" class="nameRef">mprJoinPathExt</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ext)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Join an extension to a path.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a762f62a5d048a067087092f7f783cad8" class="nameRef">mprJoinPaths</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *base, ...)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Join paths.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_list" class="ref">MprList</a> *</td><td><a href="#mpr_8h_1a6f0672f4d59870af9b7ba192c5ab9384" class="nameRef">mprJsonToEnv</a>(<a href="#struct_mpr_json" class="ref">MprJson</a> *json, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *prefix, <a href="#struct_mpr_list" class="ref">MprList</a> *list)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Convert a JSON object to a string of environment variables.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_hash" class="ref">MprHash</a> *</td><td><a href="#mpr_8h_1ab79e2004612cf322ae66e6bf1b58624e" class="nameRef">mprJsonToHash</a>(<a href="#struct_mpr_json" class="ref">MprJson</a> *json)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Convert a JSON object into a Hash object.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a40fe70c168712e6e9b6d89dd84ca1113" class="nameRef">mprJsonToString</a>(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Serialize a JSON object into a string.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a5ed0d733bcabadfc54d4b742aee6d4d4" class="nameRef">mprListToString</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *join)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Convert a list of strings to a single string.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#mpr_8h_1af9381320a2640ea84038579d8f143c01" class="ref">Socket</a></td><td><a href="#mpr_8h_1a03b1900a4646dcac3b07cb9269ec549a" class="nameRef">mprListenOnSocket</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ip, int port, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Listen on a server socket for incoming connections.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_json" class="ref">MprJson</a> *</td><td><a href="#mpr_8h_1affc6fc3de28ebfced024b0e60bb8d242" class="nameRef">mprLoadJson</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Load a JSON object from a filename.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a0635aab03b2954a722a39dd5e2545312" class="nameRef">mprLoadModule</a>(<a href="#struct_mpr_module" class="ref">MprModule</a> *mp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Load a module.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a585388ae65782b535dcea572e65ed94b" class="nameRef">mprLoadNativeModule</a>(<a href="#struct_mpr_module" class="ref">MprModule</a> *mp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Load a native module.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1adbe4b5a9c6fbb78223f9d801e3d94bb2" class="nameRef">mprLoadSsl</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Load the SSL module.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1ad193cb5549a1101dc17177f046144ede" class="nameRef">mprLock</a>(<a href="#struct_mpr_mutex" class="ref">MprMutex</a> *lock)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Lock access.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a13660aa56e0e5945b6de8f2708aed520" class="nameRef">mprLog</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *tags, int level, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Write a message to the error log file.</td></tr>
<tr class="apiDef"><td class="apiType">void void</td><td><a href="#mpr_8h_1af8aad777a56ff5b27dc2d6e09bd4f1d1" class="nameRef">mprLogConfig</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Show the product configuration at the start of the log file.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a140cca664bd923f04c12eaa3cbc3f516" class="nameRef">mprLogJson</a>(int level, <a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...) PRINTF_ATTRIBUTE(3</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Trace the JSON object to the debug log.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a9ae5abc2e8c8b3359ca450e505564359" class="nameRef">mprLookAtLastCharInBuf</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Peek at the last character in the buffer.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1abe01ab970d735db5a92cea5f9456de5e" class="nameRef">mprLookAtNextCharInBuf</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Peek at the next character in the buffer.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a39646bbac635d351180372a670d0ec2b" class="nameRef">mprLookupCache</a>(<a href="#struct_mpr_cache" class="ref">MprCache</a> *cache, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="ref">MprTime</a> *modified, <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> *version)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Lookup an item in the cache.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_file_system" class="ref">MprFileSystem</a> *</td><td><a href="#mpr_8h_1af9996ff8e70915b7d1273f19bb198e2a" class="nameRef">mprLookupFileSystem</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Lookup a file system.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a8b3d6afe4be8d416e28f64d05e8391eb" class="nameRef">mprLookupItem</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *item)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Find an item and return its index.</td></tr>
<tr class="apiDef"><td class="apiType">void *</td><td><a href="#mpr_8h_1a5b3e1f1d4e80038ece3362c328c43820" class="nameRef">mprLookupKey</a>(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *key)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Lookup a symbol in the hash table.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_key" class="ref">MprKey</a> *</td><td><a href="#mpr_8h_1a88479632e016f3def6fc4361ee8f896a" class="nameRef">mprLookupKeyEntry</a>(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *key)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Lookup a symbol in the hash table and return the hash entry.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *</td><td><a href="#mpr_8h_1a43fc54484f303196cb3fb66c73fb0205" class="nameRef">mprLookupMime</a>(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ext)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the mime type for an extension.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_module" class="ref">MprModule</a> *</td><td><a href="#mpr_8h_1a13659357368fa3c581b398d25af75bb4" class="nameRef">mprLookupModule</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Lookup a module.</td></tr>
<tr class="apiDef"><td class="apiType">void *</td><td><a href="#mpr_8h_1a8c28ede486e5dcb6e915d9bdf9b13b71" class="nameRef">mprLookupModuleData</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Lookup a module and return the module data.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a8b32a32be34fbcc2194767eb7031a3ad" class="nameRef">mprLookupStringItem</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Find a string item and return its index.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a02a389f1cd2f5a8ba4e5d2417ae87276" class="nameRef">mprMakeArgv</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *command, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> ***argv, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Make a argv style array of command arguments.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a8b825c9125a21012024b9b76f2683edb" class="nameRef">mprMakeDir</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, int perms, int owner, int group, <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> makeMissing)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Make a directory.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1ab87f107b898264faed9e921d6a3669e3" class="nameRef">mprMakeLink</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *target, <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> hard)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Make a link.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1ac1ee2c0edbc79bd697a1e5e91150bda2" class="nameRef">mprMakePassword</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *password, int saltLength, int rounds)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Make a password hash for a plain-text password using the Blowfish algorithm.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a93df5d947a962e68915d2f30d23f21ca" class="nameRef">mprMakeSalt</a>(<a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Make salt for adding to a password.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1ab9be6174f5d4126e39a9380c0386e6a4" class="nameRef">mprMapSeparators</a>(char *path, int separator)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Map the separators in a path.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1ac1eebe67d99890d0156d6fdd7fc2c7c8" class="nameRef">mprMark</a>(void *ptr)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Mark a memory block as in-use.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a1e8d2072b9923ca7a579d9dabbad1ea3" class="nameRef">mprMemcmp</a>(<a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *b1, <a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a> b1Len, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *b2, <a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a> b2Len)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Compare two byte strings.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a></td><td><a href="#mpr_8h_1a115724cd4423263288212f7a300f21d7" class="nameRef">mprMemcpy</a>(void *dest, <a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a> destMax, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *src, <a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a> nbytes)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Safe copy for a block of data.</td></tr>
<tr class="apiDef"><td class="apiType">void *</td><td><a href="#mpr_8h_1a0c911ea8e56d1dee46e1a25da801f589" class="nameRef">mprMemdup</a>(<a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr, <a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a> size)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Duplicate a block of memory.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1aa3bb4935aa8ee20f4f064068ff28b2a5" class="nameRef">mprNap</a>(<a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> msec)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Nap for a while.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a525ba7359a573e4dee78703ea6ef93eb" class="nameRef">mprNeedYield</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if a thread should call mprYield.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a5c43b80274f98cb355a25b1cefcc93df" class="nameRef">mprNormalizePath</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Normalize a path.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1ac3ea30ea8cd57eb5767f1d2ae87b13d2" class="nameRef">mprNotifyOn</a>(<a href="#struct_mpr_wait_handler" class="ref">MprWaitHandler</a> *wp, int mask)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Begin I/O notification services on a wait handler.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_file" class="ref">MprFile</a> *</td><td><a href="#mpr_8h_1a7c2b7b9e2b2aa88b4d742f9b2c5ccfd7" class="nameRef">mprOpenFile</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *filename, int omode, int perms)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Open a file.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1adbc113c2a4d14de7a12114eda5b1e733" class="nameRef">mprParseArgs</a>(char *command, char **argv, int maxArgs)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Make a argv style array of command arguments.</td></tr>
<tr class="apiDef"><td class="apiType">void MprJson *</td><td><a href="#mpr_8h_1a0de687b086c6e81c5c8e32c999cdc29f" class="nameRef">mprParseJson</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Parse a JSON string into an object tree.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_json" class="ref">MprJson</a> *</td><td><a href="#mpr_8h_1a006af99fb3614d9088e5ee1c5b030fc0" class="nameRef">mprParseJsonEx</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="#struct_mpr_json_callback" class="ref">MprJsonCallback</a> *callback, void *data, <a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> **errorMsg)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Extended JSON parsing from a JSON string into an object tree.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_json" class="ref">MprJson</a> *</td><td><a href="#mpr_8h_1a5fe7d3512b827892ecade02699d05e70" class="nameRef">mprParseJsonInto</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="#struct_mpr_json" class="ref">MprJson</a> *obj)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Parse a JSON string into an existing object.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a61245183116b13284f64ed2b707484aa" class="nameRef">mprParseSocketAddress</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *address, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> **ip, int *port, int *secure, int defaultPort)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Parse an socket address IP address.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1adbed992189919b8d40b5008ee54a0ccb" class="nameRef">mprPathExists</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, int omode)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Determine if a file exists for a path name and can be accessed.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1abba294cacccaced9435b1151e2db9c95" class="nameRef">mprPeekFileChar</a>(<a href="#struct_mpr_file" class="ref">MprFile</a> *file)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Non-destructively read a character from the file.</td></tr>
<tr class="apiDef"><td class="apiType">void *</td><td><a href="#mpr_8h_1a9b2b7113051a42a49734d88335ee543c" class="nameRef">mprPopItem</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Pop an item.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1abfcf6cb48022377398e0b0a400e49aec" class="nameRef">mprPreloadSsl</a>(struct MprSsl *ssl, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Preload SSL configuration.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1ae5a3493548a457c179c0f7006d6171a9" class="nameRef">mprPrintMem</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *msg, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Print a memory usage report to stdout.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> ssize,ssize</td><td><a href="#mpr_8h_1ab80b8013c78bb488b6f578cd48702259" class="nameRef">mprPrintf</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...) PRINTF_ATTRIBUTE(1</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Formatted print.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> ssize,ssize,ssize,char,*</td><td><a href="#mpr_8h_1ad1fa00797a25850a5aed316aaadf4b1b" class="nameRef">mprPrintfCore</a>(char *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> maxsize, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, va_list args)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Format a string into a buffer.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a5abf88b56ea534c0cb36b0969f56d274" class="nameRef">mprPruneCache</a>(<a href="#struct_mpr_cache" class="ref">MprCache</a> *cache)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Prune the cache.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a7f35b9db9fe36c3bf91954c6acb98467" class="nameRef">mprPushItem</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *item)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Push an item onto the list.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1aa88196b86b9c9544f97e5910b015380d" class="nameRef">mprPutBlockToBuf</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ptr, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Put a block to the buffer.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a5ab66b5d96db8b33e3bb0c3bbb9c90e2" class="nameRef">mprPutCharToBuf</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, int c)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Put a character to the buffer.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1a461e26b7175b96b6953e02e16219b426" class="nameRef">mprPutFileChar</a>(<a href="#struct_mpr_file" class="ref">MprFile</a> *file, int c)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Write a character to the file.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1a139515262948d6bd2f03d802d8fff34e" class="nameRef">mprPutFileString</a>(<a href="#struct_mpr_file" class="ref">MprFile</a> *file, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Write a string to the file.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> ssize</td><td><a href="#mpr_8h_1ad98ea666348e1e1ed066b19b6f4825bb" class="nameRef">mprPutIntToBuf</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> i)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Put an integer to the buffer.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1ae3886d4e6180a460bc74a80047a54c70" class="nameRef">mprPutPadToBuf</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, int c, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> count)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Put padding characters to the buffer.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1a50d08cdfc9c21e71af90586104a5839e" class="nameRef">mprPutStringToBuf</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Put a string to the buffer.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1a394fa1a51d7f2dcc4be222f51ea5a25b" class="nameRef">mprPutSubStringToBuf</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> count)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Put a substring to the buffer.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1adedfafbf8dca819c37cdbc41592b4823" class="nameRef">mprPutToBuf</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...) PRINTF_ATTRIBUTE(2</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Put a formatted string to the buffer.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_json" class="ref">MprJson</a> *</td><td><a href="#mpr_8h_1a870629694aae99d61e7c42724b687177" class="nameRef">mprQueryJson</a>(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value, int type)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Query a JSON object for a property key path and execute the given command.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a52f88939c5c03270beff007574b4aeb0" class="nameRef">mprQueueIOEvent</a>(<a href="#struct_mpr_wait_handler" class="ref">MprWaitHandler</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Queue an IO event for dispatch on the wait handler dispatcher.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1adb3d1376089ffada27656c3a69cdf74f" class="nameRef">mprRandom</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Return a random number.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a9a5e2d48f59b4d7c88ec76cc311b0c70" class="nameRef">mprReadCache</a>(<a href="#struct_mpr_cache" class="ref">MprCache</a> *cache, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="ref">MprTime</a> *modified, <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> *version)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Read an item from the cache.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1a00910d0636480e6960ebbf46d58b5a2e" class="nameRef">mprReadCmd</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, int channel, char *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> bufsize)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Make the I/O channels to send and receive data to and from the command.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1a5edc60c8f5b38c394accf29cd6785f96" class="nameRef">mprReadFile</a>(<a href="#struct_mpr_file" class="ref">MprFile</a> *file, void *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Read data from a file.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *</td><td><a href="#mpr_8h_1ac4d45407221833dab580a985f5683a3a" class="nameRef">mprReadJson</a>(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Read a JSON property.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_json" class="ref">MprJson</a> *</td><td><a href="#mpr_8h_1a38f389697501628013693b6d05f54533" class="nameRef">mprReadJsonObj</a>(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Read a JSON object.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_json" class="ref">MprJson</a> *</td><td><a href="#mpr_8h_1a7b501e43afc333cf9c17a78964706bda" class="nameRef">mprReadJsonValue</a>(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Read a JSON object by value.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a3a06b0b88d6cece00b874fe2bb4102f8" class="nameRef">mprReadLine</a>(<a href="#struct_mpr_file" class="ref">MprFile</a> *file, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> *len)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Read a line from the file.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1aac9abd36a2e632460428af4d512ab2d0" class="nameRef">mprReadSocket</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, void *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Read from a socket.</td></tr>
<tr class="apiDef"><td class="apiType">void *</td><td><a href="#mpr_8h_1a2b71af38b349cfb4cec0545eff22de59" class="nameRef">mprRealloc</a>(void *ptr, <a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a> size)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Reallocate a block.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1aae5bd75d3750777971cfad687c0f9f15" class="nameRef">mprReapCmd</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Reap the command.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a82f81798dcccf075cc6fc272a4abcffc" class="nameRef">mprRecallWaitHandler</a>(<a href="#struct_mpr_wait_handler" class="ref">MprWaitHandler</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Recall a wait handler.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1ab449e3836233feee7490af3364437d15" class="nameRef">mprRecallWaitHandlerByFd</a>(<a href="#mpr_8h_1af9381320a2640ea84038579d8f143c01" class="ref">Socket</a> fd)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Recall a wait handler by fd.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a9e7451ec61507706a06c6c8149bebc52" class="nameRef">mprRefillBuf</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Refill the buffer with data.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a4816868550ad8a21b914de2fbe720767" class="nameRef">mprRelease</a>(<a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Release a memory block.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a57e8bfb292529e6ce63b21aca0543fb3" class="nameRef">mprReleaseBlocks</a>(<a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr, ...)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Release a memory blocks.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1adae3b874e39e0d5e0155d5179f1d83cc" class="nameRef">mprReleaseWorker</a>(<a href="#struct_mpr_worker" class="ref">MprWorker</a> *worker)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Release a worker thread.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a6585b0b574a517d4149b4f651973d95d" class="nameRef">mprRemoveCache</a>(<a href="#struct_mpr_cache" class="ref">MprCache</a> *cache, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Remove items from the cache.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a9163bc8e37a8ff05c0c957cfcc86e02e" class="nameRef">mprRemoveEvent</a>(<a href="#struct_mpr_event" class="ref">MprEvent</a> *event)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Remove an event.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1aa7e9868693c4c804b2c356509dcbb798" class="nameRef">mprRemoveItem</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *item)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Remove an item from the list.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1ac758d5af71b0bbf943bb6a1e263a494c" class="nameRef">mprRemoveItemAtPos</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list, int index)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Remove an item from the list.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_json" class="ref">MprJson</a> *</td><td><a href="#mpr_8h_1aa148c1b0444356002340f837bfb289db" class="nameRef">mprRemoveJson</a>(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Remove a property from a JSON object.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_json" class="ref">MprJson</a> *</td><td><a href="#mpr_8h_1aaa5f26b2aae99acc06e9de4d4a300ff6" class="nameRef">mprRemoveJsonChild</a>(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="#struct_mpr_json" class="ref">MprJson</a> *child)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Remove a child from a JSON object WARNING: do not call this API when traversing the object in question using ITERATE_JSON.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a1257962021e54d8c6156e49031b7a8ec" class="nameRef">mprRemoveKey</a>(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *key)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Remove a symbol entry from the hash table.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a85633d8034896cf4f056caa1857bf4a8" class="nameRef">mprRemoveLastItem</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Remove the last item from the list.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a16748fa2520761d373cebe4b39be3e8e" class="nameRef">mprRemoveRangeOfItems</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list, int start, int end)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Remove a range of items from the list.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a369beaea43886e4fdd3d4549a2c13cb7" class="nameRef">mprRemoveRoot</a>(<a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Remove a memory block as a root for garbage collection.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a02e481047fbc58df3cf3afc31f15a2b4" class="nameRef">mprRemoveSocketHandler</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Remove a socket wait handler.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a7d948c448d34a433b728c7a19aae1814" class="nameRef">mprRemoveStringItem</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Remove a string item from the list.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1aa7e94f04dd2634590ebf35d099bc3c63" class="nameRef">mprRemoveWaitHandler</a>(<a href="#struct_mpr_wait_handler" class="ref">MprWaitHandler</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Remove a wait handler from the wait service.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a34487f0a0ccc42698ec93d73d3c880f1" class="nameRef">mprReplacePathExt</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ext)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Replace an extension to a path.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a1919da044dd4f62d999526175f76bdc2" class="nameRef">mprRescheduleEvent</a>(<a href="#struct_mpr_event" class="ref">MprEvent</a> *event, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> period)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Reschedule an event.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1ae6f9d70c3aab3eb2d9235a1c2a8f63a8" class="nameRef">mprResetBufIfEmpty</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Reset the buffer.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a3db47bdecb58c2c52197d625377cf71b" class="nameRef">mprResetCond</a>(<a href="#struct_mpr_cond" class="ref">MprCond</a> *cond)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Reset a condition variable.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a0d6ef2dfceedfe111eb55bc88c4435ba" class="nameRef">mprResetMemError</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Reset the memory allocation error flag.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1aa4bf0d2c9a7c854dcb9edc83035c84ba" class="nameRef">mprResetYield</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Reset a sticky yield.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a5cae743a4ae7f3b84630581282358160" class="nameRef">mprResolvePath</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *base, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Resolve paths.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1acce9cdb4178a693af784d4b37a862665" class="nameRef">mprRestart</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Restart the application.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a6fa51ab06c56baaad50f1b4df7efc1d4" class="nameRef">mprRestartContinuousEvent</a>(<a href="#struct_mpr_event" class="ref">MprEvent</a> *event)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Restart an event.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a03f3b71716eefb236c7a88a4a92acbe4" class="nameRef">mprRun</a>(<a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *command, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *input, char **output, char **error, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Run a simple blocking command using a string command line.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1aea3178396a249792e696eb04ee9df3ba" class="nameRef">mprRunCmd</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *command, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> **envp, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *in, char **out, char **err, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Run a command using a string command line.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a40c6d3c5980dd3db76189fa6ee38874a" class="nameRef">mprRunCmdV</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, int argc, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> **argv, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> **envp, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *in, char **out, char **err, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Run a command using an argv[] array of arguments.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a05f5c0032fd356cf18c2580ffb37be4d" class="nameRef">mprSamePath</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path1, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path2)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Compare two paths if they are the same.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1aefab5559ec726c9e2d08e20211177249" class="nameRef">mprSamePathCount</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path1, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path2, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Compare two paths if they are the same for a given length.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a5008430f9a6c74ab8c94f9b081670fbc" class="nameRef">mprSaveJson</a>(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Save a JSON object to a filename.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a702d78826b619870746315bf551ad44c" class="nameRef">mprSearchForModule</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *module)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Search for a module on the current module path.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a2294ad095d30050d31289b2b722f8f9a" class="nameRef">mprSearchPath</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, int flags, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *search, ...)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Search for a path.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#mpr_8h_1a87e9f435008723c7b1489af1944c6e20" class="ref">MprOff</a></td><td><a href="#mpr_8h_1aaddd841fab4eb81ea0cefed2c24b5d1c" class="nameRef">mprSeekFile</a>(<a href="#struct_mpr_file" class="ref">MprFile</a> *file, int seekType, <a href="#mpr_8h_1a87e9f435008723c7b1489af1944c6e20" class="ref">MprOff</a> distance)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Seek the I/O pointer to a new location in the file.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a8959f22b309ae567b81cb45433e4e04a" class="nameRef">mprSerialize</a>(<a href="#struct_mpr_hash" class="ref">MprHash</a> *hash, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Serialize a hash of properties as a JSON string.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a205adaee3b45d0cc899afc89eb9f3b3d" class="nameRef">mprServiceEvents</a>(<a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> delay, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Service events.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a8f997de03358e990de88e7e952b48641" class="nameRef">mprServicesAreIdle</a>(<a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> traceRequests)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Determine if the MPR services.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1ad48220b7862b645de3920d74aa9b011e" class="nameRef">mprSetAppName</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *title, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *version)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the application name, title and version.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a6ba839ff6e8b6e4cfa5c17ad6356d9ac" class="nameRef">mprSetAppPath</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the application executable path.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1affa4e80d4cc95a6816bfe84767d11e2f" class="nameRef">mprSetBufMax</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> maxSize)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the maximum buffer size.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a7f74f8c3d5af9db8c064b365f39cae2c" class="nameRef">mprSetBufRefillProc</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, <a href="#mpr_8h_1ac1eae8096b0311d63a3fba54015bf1b9" class="ref">MprBufProc</a> fn, void *arg)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the buffer refill procedure.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1ab72f5c9cc154767c1b299f665237d6a6" class="nameRef">mprSetBufSize</a>(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> maxSize)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the buffer size.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1ac79a433b92c0e81df3b282345eef07ad" class="nameRef">mprSetCacheLimits</a>(<a href="#struct_mpr_cache" class="ref">MprCache</a> *cache, <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> keys, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> lifespan, <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> memory, int resolution)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the cache resource limits.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1aaa3c0cea1ad910b3fb83dc7800b46b95" class="nameRef">mprSetCacheLink</a>(<a href="#struct_mpr_cache" class="ref">MprCache</a> *cache, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, void *link)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set a linked managed memory reference for a cached item.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1ab0a5564222ed33ad6fd3e4ccbeb78aef" class="nameRef">mprSetCacheNotify</a>(<a href="#struct_mpr_cache" class="ref">MprCache</a> *cache, <a href="#mpr_8h_1af96182122f42e2c56539fb35594f985c" class="ref">MprCacheProc</a> notify)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set a notification callback to be invoked for events of interest on cached items.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a8288e08dc7387c14e0536d214eba6049" class="nameRef">mprSetCmdCallback</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, <a href="#mpr_8h_1a078fd5619ce8db80dab30bc99016f17b" class="ref">MprCmdProc</a> callback, void *data)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Define a callback to be invoked to receive response data from the command.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a9f86aee08df0e092359a9d2ed662f856" class="nameRef">mprSetCmdDefaultEnv</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> **env)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the default environment to use for commands.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1aa0e753a2136410b79e480713aaf97b89" class="nameRef">mprSetCmdDir</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *dir)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the home directory for the command.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a731bf3b3b53862f42249d5a771107363" class="nameRef">mprSetCmdEnv</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> **env)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the command environment.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a8810126341868790cc02a34e4a0833ec" class="nameRef">mprSetCmdSearchPath</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *search)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the default command search path.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a0cf82b3bc13e3e4da2bc35526720e913" class="nameRef">mprSetCmdlineLogging</a>(<a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> on)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set if command line logging was requested.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1acb25fd80b4d560d2c347ae8a692de0f1" class="nameRef">mprSetDebugMode</a>(<a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> on)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Turn on debug mode.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a9dbc9553237fd2af50c9cf7e19f3045a" class="nameRef">mprSetDomainName</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the application domain name string.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1aa335e1d324029029795409a9a857dbdf" class="nameRef">mprSetEnv</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set an environment variable value.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a85f5df7ec845e2748c1ce3dd4afc64ce" class="nameRef">mprSetError</a>(int error)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the error code.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1aecca029381f63b1dbd33b5df3556cc3d" class="nameRef">mprSetEventServiceSleep</a>(<a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> delay)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the maximum sleep time for the event service.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1af879e1101793951172696115c02ca346" class="nameRef">mprSetExitStatus</a>(int status)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the proposed exit status.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a278ee775a1c2e956d09a4683e778caea" class="nameRef">mprSetExitTimeout</a>(<a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the exit timeout for a shutdown.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a53dd3e2813e09afdeca537bd1a8584c8" class="nameRef">mprSetFilesLimit</a>(int limit)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the maximum number of open file/socket descriptors.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1af61307049c58bbb253244babc9d5a6b1" class="nameRef">mprSetHostName</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the application host name string.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#mpr_8h_1a04047ab092be560a73185e083baccf4f" class="ref">MprIdleCallback</a></td><td><a href="#mpr_8h_1a829517ad9c44a5a377f3d70928c6d9c2" class="nameRef">mprSetIdleCallback</a>(<a href="#mpr_8h_1a04047ab092be560a73185e083baccf4f" class="ref">MprIdleCallback</a> idleCallback)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Define a new idle callback to be invoked by <a class="ref" href="#mpr_8h_1aa07c03ff5f586d99e46ad8bc7b519eba">mprIsIdle()</a></td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a1fa92eb8cb9bf4f023f4f60f57001abc" class="nameRef">mprSetIpAddr</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ip)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Sete the application IP address string.</td></tr>
<tr class="apiDef"><td class="apiType">void *</td><td><a href="#mpr_8h_1a9f47ecd1bfa2a2ef8f530fc395a10950" class="nameRef">mprSetItem</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list, int index, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *item)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set a list item.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1aa19ca22bc6745f7d28d295dfe8dffb15" class="nameRef">mprSetJson</a>(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value, int type)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Update a key/value in the JSON object with a string value.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a5cbd801cd3f61932e4e7273b0cfada2e" class="nameRef">mprSetJsonError</a>(<a href="#struct_mpr_json_parser" class="ref">MprJsonParser</a> *jp, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...) PRINTF_ATTRIBUTE(2</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Signal a parse error in the JSON input stream.</td></tr>
<tr class="apiDef"><td class="apiType">void int</td><td><a href="#mpr_8h_1a23d9bdbb739d0a21de0e0bbc98e6ee03" class="nameRef">mprSetJsonObj</a>(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="#struct_mpr_json" class="ref">MprJson</a> *value)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Update a property in a JSON object.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a8a1f63942d93420121a18e0cf5a56d91" class="nameRef">mprSetKey</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, void *value)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Store a key/value pair.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a38bd862a8bc3076d86b0185d5bd81aa6" class="nameRef">mprSetListLimits</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list, int initialSize, int maxSize)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Define the list size limits.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1ad1c46a00821497d3146925dde1980791" class="nameRef">mprSetLogBackup</a>(<a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> logSize, int backupCount, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the log rotation parameters.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a02941fa13af43f80adda4840d94f215b" class="nameRef">mprSetLogFile</a>(struct MprFile *file)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set a file to be used for logging.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#mpr_8h_1a8fdb97b78014d2a084a4747a35b3235a" class="ref">MprLogHandler</a></td><td><a href="#mpr_8h_1a834e7ceec5efa68d0d73eb45c3c69780" class="nameRef">mprSetLogHandler</a>(<a href="#mpr_8h_1a8fdb97b78014d2a084a4747a35b3235a" class="ref">MprLogHandler</a> handler)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set an MPR debug log handler.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a5072dbfb7278b3247096146ead8b7162" class="nameRef">mprSetLogLevel</a>(int level)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the current logging verbosity level.</td></tr>
<tr class="apiDef"><td class="apiType">void *</td><td><a href="#mpr_8h_1ac16b2cfc057a6df9c6012a9005edf64d" class="nameRef">mprSetManager</a>(void *ptr, <a href="#mpr_8h_1ad5e84d898dd29853b54cc1b49fcb4041" class="ref">MprManager</a> manager)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Update the manager for a block of memory.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1ad69af558283f6f1f3277ae9e77029017" class="nameRef">mprSetMaxSocketAccept</a>(int max)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the maximum number of accepted client connections that are permissable.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a9982a2441762d3a7f82c01c1c5be4476" class="nameRef">mprSetMaxWorkers</a>(int count)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the maximum count of worker threads Set the maximum number of worker pool threads for the MPR.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1ae50c8f8027adb12b70482afa8b3b979f" class="nameRef">mprSetMemError</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set an memory allocation error condition on a memory context.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1ab0b7e384d28606a450f21bc50a8b0c12" class="nameRef">mprSetMemLimits</a>(<a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> warnHeap, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> maximum, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> cache)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Configure the application memory limits.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a32742d6a82477fabee9c821138ffd824" class="nameRef">mprSetMemNotifier</a>(<a href="#mpr_8h_1ac7be61c63c8a92243c67986431c48083" class="ref">MprMemNotifier</a> cback)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Define a memory notifier.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a282926d76d53bde980ec5f5c5004a3b3" class="nameRef">mprSetMemPolicy</a>(int policy)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the memory allocation policy for when allocations fail.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a5f1165a45b9a43aed99b1e25900b0fbd" class="nameRef">mprSetMimeProgram</a>(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *mimeType, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *program)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the mime type program.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1abb03b89f212e6a3fd8bc13e66927ab68" class="nameRef">mprSetMinWorkers</a>(int count)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the minimum count of worker threads Set the count of threads the worker pool will have.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a5432257cb103fefa67fd46e33a0e5917" class="nameRef">mprSetModuleFinalizer</a>(<a href="#struct_mpr_module" class="ref">MprModule</a> *module, <a href="#mpr_8h_1a98c47ddbb625a457617163f7aeeb0edb" class="ref">MprModuleProc</a> stop)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Define a module finalizer that will be called before a module is stopped.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a43d50c6e385a3592778d00c1dc53a8e7" class="nameRef">mprSetModuleSearchPath</a>(char *searchPath)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the module search path.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a2db0b5b247179376ef476fa5ed05809a" class="nameRef">mprSetModuleTimeout</a>(<a href="#struct_mpr_module" class="ref">MprModule</a> *module, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set a module timeout.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1aaaecf83d8b07a92579eb8ad5454cdc45" class="nameRef">mprSetOsError</a>(int error)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the O/S error code.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a10d97267fcc49bb5126547b3a520d812" class="nameRef">mprSetPathNewline</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *newline)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the file system new line character string.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a604f5f0da674b354c16dc30be6f058d2" class="nameRef">mprSetPathSeparators</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *separators)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the file system path separators.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a4def6498567ad43a6da505d43bb119fc" class="nameRef">mprSetServerName</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the application server name string.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1ae2baa591f0466c9c64f0cf0147ada904" class="nameRef">mprSetSocketBlockingMode</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> on)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the socket blocking mode.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1acff97154e7990fa91949ccdfbf34acbe" class="nameRef">mprSetSocketDispatcher</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, <a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the dispatcher to use for socket events.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a27866b4c10d6e45ffd96604b221cf314" class="nameRef">mprSetSocketEof</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> eof)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set an EOF condition on the socket.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a51594bafaa2003511990ffd804189a31" class="nameRef">mprSetSocketNoDelay</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> on)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the socket delay mode.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1ac3a517628870edef01c2ee01c076822a" class="nameRef">mprSetSslAlpn</a>(struct MprSsl *ssl, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *protocols)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the ALPN protocols for SSL.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a472960cd4ec2360bf05ab678e7cba577" class="nameRef">mprSetSslCaFile</a>(struct MprSsl *ssl, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *caFile)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the client certificate file to use for SSL.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1aadf254e5df954326a3f9bcd61e6a106b" class="nameRef">mprSetSslCaPath</a>(struct MprSsl *ssl, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *caPath)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the path for the client certificate directory.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a0eb821dce1b17ce08d83fa63b3ece658" class="nameRef">mprSetSslCertFile</a>(struct MprSsl *ssl, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *certFile)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set certificate to use for SSL.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1af3d90b0a59c1e786421e8f2c2167fa20" class="nameRef">mprSetSslCiphers</a>(<a href="#struct_mpr_ssl" class="ref">MprSsl</a> *ssl, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ciphers)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the ciphers to use.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a9cda2e070839fbe3188fcd0ceccfdea9" class="nameRef">mprSetSslDevice</a>(<a href="#struct_mpr_ssl" class="ref">MprSsl</a> *ssl, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *device)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the SSL Engine to use.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1ab6cfe15aa1aa544af99d7fd3279d83ee" class="nameRef">mprSetSslHostname</a>(<a href="#struct_mpr_ssl" class="ref">MprSsl</a> *ssl, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *hostname)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the desired hostname for this SSL configuration when using SNI.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1aa8293be1a1b769f03db306834ef5291f" class="nameRef">mprSetSslKeyFile</a>(struct MprSsl *ssl, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *keyFile)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the key file to use for SSL.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1abcdba4618d5754a0ccfc76ef271776d8" class="nameRef">mprSetSslLogLevel</a>(struct MprSsl *ssl, int level)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the SSL log level at which to start tracing SSL events.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a375d09974e061112fd50d1e705143887" class="nameRef">mprSetSslMatch</a>(struct MprSsl *ssl, MprMatchSsl match)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set a match callback to select the appropriate SSL configuration to use in response to a client SNI hello.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a00cd731b20d96a0b0080637d59becd4a" class="nameRef">mprSetSslProtocols</a>(struct MprSsl *ssl, int protocols)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the SSL protocol to use.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1abe689d34f52874f6b1ab0d384c95decb" class="nameRef">mprSetSslProvider</a>(<a href="#struct_mpr_socket_provider" class="ref">MprSocketProvider</a> *provider)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the SSL provider to use.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1adc15a963cd6567f7fa05da968bee39a6" class="nameRef">mprSetSslRenegotiate</a>(<a href="#struct_mpr_ssl" class="ref">MprSsl</a> *ssl, <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> enable)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Control SSL session renegotiation.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a0fe151c86620dc1eec03e0f35082e075" class="nameRef">mprSetSslRevoke</a>(struct MprSsl *ssl, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *revoke)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Define a list of certificates to revoke.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a16313273a92421655778343d310475ee" class="nameRef">mprSetSslTicket</a>(<a href="#struct_mpr_ssl" class="ref">MprSsl</a> *ssl, <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> enable)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Enable SSL session tickets.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a57f5e86ffcf2cabdb1c778131ac84b7e" class="nameRef">mprSetThreadYield</a>(<a href="#struct_mpr_thread" class="ref">MprThread</a> *tp, <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> on)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set whether a thread can yield for GC.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1ad7721cca919f57f9b85434e6435ef092" class="nameRef">mprSetWorkerStackSize</a>(int size)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the default worker stack size.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1ac79cdd0486a5ee8a6db3e93096f15ee9" class="nameRef">mprShouldAbortRequests</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if requests should be aborted.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a8b6c8348517bf8cb56468cb8106d7147" class="nameRef">mprShouldDenyNewRequests</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if new requests should be denied.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a2836549ee05ea1901a64a26e51f8ed86" class="nameRef">mprShutdown</a>(int exitStrategy, int status, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Initiate shutdown of the MPR and application.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1ab014329886bcb9a8cb9b970afc30378b" class="nameRef">mprSignalCond</a>(<a href="#struct_mpr_cond" class="ref">MprCond</a> *cond)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Signal a condition lock variable.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1ac81ecb3239317f36c36c7d849d738540" class="nameRef">mprSignalDispatcher</a>(<a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Signal the dispatcher to wakeup and re-examine its queues.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a9b20d1bf69e28579dd968c1c0daf976b" class="nameRef">mprSignalMultiCond</a>(<a href="#struct_mpr_cond" class="ref">MprCond</a> *cond)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Signal a condition lock variable for use with multiple waiters.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a85c39ea54c27d4b13825ba78c2e7adda" class="nameRef">mprSleep</a>(<a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> msec)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Sleep for a while.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a1a937447e0d16a18c8c4fd61df568d59" class="nameRef">mprSocketHandshaking</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if the socket is doing an SSL handshake.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a8bd161da457c7cdc6eb4437d714534f6" class="nameRef">mprSocketHasBuffered</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if the socket has buffered data.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a3083d9605d116fa97f48d7941da8648e" class="nameRef">mprSocketHasBufferedRead</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if the socket has buffered read data.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a23bc7f651617f75a71ba39686db02f47" class="nameRef">mprSocketHasBufferedWrite</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if the socket has buffered write data.</td></tr>
<tr class="apiDef"><td class="apiType">void *</td><td><a href="#mpr_8h_1a11805cd151f7b445d25457e7262d4117" class="nameRef">mprSort</a>(void *base, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> num, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> width, <a href="#mpr_8h_1a69516d3096bf8d921a5348af8ce7ebde" class="ref">MprSortProc</a> compare, void *ctx)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Quicksort.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_list" class="ref">MprList</a> *</td><td><a href="#mpr_8h_1a66e67b9938519486e9cb190582731999" class="nameRef">mprSortList</a>(<a href="#struct_mpr_list" class="ref">MprList</a> *list, <a href="#mpr_8h_1a69516d3096bf8d921a5348af8ce7ebde" class="ref">MprSortProc</a> compare, void *ctx)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Sort a list.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1af2a84bc9cee343c8ebfc3bfa49751795" class="nameRef">mprSpinLock</a>(<a href="#struct_mpr_spin" class="ref">MprSpin</a> *lock)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Lock a spinlock.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1aeb11c8a1f0c2c3f905967a932626121e" class="nameRef">mprSpinUnlock</a>(<a href="#struct_mpr_spin" class="ref">MprSpin</a> *lock)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Unlock a spinlock.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1ad2a85131eb557b8beeedb22d851f6dc7" class="nameRef">mprSslInit</a>(void *unused, <a href="#struct_mpr_module" class="ref">MprModule</a> *module)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Initialize the SSL provider.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a57dfaf371ac0d16f5a09dc6595316692" class="nameRef">mprStart</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Start the <a class="ref" href="#struct_mpr">Mpr</a> services.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a120e7a3a3a571b9520853e31d9ce6021" class="nameRef">mprStartCmd</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, int argc, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> **argv, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> **envp, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Start the command.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a05910285cefa99428bada1572eed1bbd" class="nameRef">mprStartDispatcher</a>(<a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Start a dispatcher by setting it on the run queue.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1add5858bb2b86157b6d37aef892696241" class="nameRef">mprStartEventsThread</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Start an thread dedicated to servicing events.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a8497fae7134238ba1b5f22680b1fd344" class="nameRef">mprStartLogging</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *logSpec, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Start logging.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1ada93a8c2366fe16efc767791d81793bd" class="nameRef">mprStartModule</a>(<a href="#struct_mpr_module" class="ref">MprModule</a> *mp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Start a module.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a1e4dcdd954efac9c65c5c462c24967be" class="nameRef">mprStartModuleService</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Start the module service.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1aea150df805ae67bea5f09b095544f14c" class="nameRef">mprStartOsService</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Start the O/S dependent subsystem.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a3026fd2597352a226c67dcd2f847ed08" class="nameRef">mprStartOsThread</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, void *proc, void *data, <a href="#struct_mpr_thread" class="ref">MprThread</a> *tp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Start an O/S thread.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a35c53df918c2f52e2e1f6961e35ee8d1" class="nameRef">mprStartThread</a>(<a href="#struct_mpr_thread" class="ref">MprThread</a> *thread)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Start a thread.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1aff85a5fec251ea6ce4c9f24532b93e11" class="nameRef">mprStartWorker</a>(<a href="#mpr_8h_1a6c2bc16deb84f2893c1935deb94bec29" class="ref">MprWorkerProc</a> proc, void *data)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Start a worker thread.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#mpr_8h_1af9381320a2640ea84038579d8f143c01" class="ref">Socket</a></td><td><a href="#mpr_8h_1a46693977a785a59037ff73375bd2acb2" class="nameRef">mprStealSocketHandle</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Steal the socket handle.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a6a027763dead49cc62961a6e6b17c501" class="nameRef">mprStopCmd</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, int signal)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Stop the command.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a1f2c85a20242ec0c1e4830ccd25c7bb7" class="nameRef">mprStopContinuousEvent</a>(<a href="#struct_mpr_event" class="ref">MprEvent</a> *event)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Stop an event.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a046940fc239f1be73583fd76b312116a" class="nameRef">mprStopDispatcher</a>(<a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Stop a dispatcher by removing it from the run queue.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1aa07f1efa0d8eb9f8cfe00749a2a8518f" class="nameRef">mprStopModule</a>(<a href="#struct_mpr_module" class="ref">MprModule</a> *mp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Stop a module.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a6284c58e5740cea74f8c072d53d2cd8d" class="nameRef">mprStopModuleService</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Stop the module service.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a1fa973743b8b7ab3132f6326d47e2caf" class="nameRef">mprStopOsService</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Stop the O/S dependent subsystem.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a6468e63efbe2e8cdfbb147575641e058" class="nameRef">mprSuspendThread</a>(<a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Suspend the current thread.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a5d538da0c5cff7c4496331fe377fec65" class="nameRef">mprTransformPath</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Transform a path.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a8dee28617aab5fcfc94faf44a9e561c7" class="nameRef">mprTrimPathComponents</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, int count)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Trim path components from a path.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a8d997404544c961232bdd255ac8122b2" class="nameRef">mprTrimPathDrive</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Trim the drive from a path.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1acc54c392eac933777fd6871d6e26a195" class="nameRef">mprTrimPathExt</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Trim an extension from a path.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a61cd5b0e215e4dafa26f90839cc9429e" class="nameRef">mprTruncateFile</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="#mpr_8h_1a87e9f435008723c7b1489af1944c6e20" class="ref">MprOff</a> size)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Truncate a file.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a2b3b8e824b92499192ea48512e31c26d" class="nameRef">mprTryLock</a>(<a href="#struct_mpr_mutex" class="ref">MprMutex</a> *lock)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Attempt to lock access.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1ac257b932fcc7140852e6830640d2301b" class="nameRef">mprTrySpinLock</a>(<a href="#struct_mpr_spin" class="ref">MprSpin</a> *lock)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Attempt to lock access on a spin lock.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a4174cbe5ab086ed09c6669969683bba9" class="nameRef">mprUnloadModule</a>(<a href="#struct_mpr_module" class="ref">MprModule</a> *mp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Unload a module.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1adb54bcae3a174efcde1c0ea3c6f8a565" class="nameRef">mprUnloadNativeModule</a>(<a href="#struct_mpr_module" class="ref">MprModule</a> *mp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Unload a native module.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a40a516fe58b4b2998852cd0c853027ad" class="nameRef">mprUnlock</a>(<a href="#struct_mpr_mutex" class="ref">MprMutex</a> *lock)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Unlock a mutex.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a12b7f81e6e807d025f0de76f27d9f54e" class="nameRef">mprUpgradeSocket</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, struct MprSsl *ssl, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *peerName)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Upgrade a socket to use SSL/TLS.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1af03b7222f372da3367027b0f92f3e83f" class="nameRef">mprUriDecode</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *uri)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Decode a URI string by de-scaping URI characters.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a48f524ad7c7269fe2ad8d7c3d6b18e04" class="nameRef">mprUriDecodeInSitu</a>(char *uri)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Decode a URI string by de-scaping URI characters.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a075b8404f829cbbd86365ba837445ad9" class="nameRef">mprUriEncode</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *uri, int map)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Encode a string by escaping URI characters.</td></tr>
<tr class="apiDef"><td class="apiType">void int</td><td><a href="#mpr_8h_1a55085e339b37476746b29118be44cca3" class="nameRef">mprUsingDefaultLogHandler</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Determine if the app is using the default MPR log handler.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a541aec6f41d797ea79ca2df68836bc8b" class="nameRef">mprVerifySslDepth</a>(struct MprSsl *ssl, int depth)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Control the depth of SSL SSL certificate verification.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1aa94da504a06310268bed77f129201803" class="nameRef">mprVerifySslIssuer</a>(struct MprSsl *ssl, <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> on)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Control the verification of SSL certificate issuers.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a03d58e43481126fde6095e65130918cc" class="nameRef">mprVerifySslPeer</a>(struct MprSsl *ssl, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *mode)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Require verification of peer certificates.</td></tr>
<tr class="apiDef"><td class="apiType">void *</td><td><a href="#mpr_8h_1a312cc2081a581e190c6f8d0107727aa0" class="nameRef">mprVirtAlloc</a>(<a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a> size, int mode)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Memory virtual memory into the applications address space.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a6d3bd582a0bdcafa69428aa29c0279c8" class="nameRef">mprVirtFree</a>(void *ptr, <a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a> size)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Free (unpin) a mapped section of virtual memory.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a1e3fc2a672d14270f5a15f08b9a99409" class="nameRef">mprWaitForCmd</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Wait for the command to complete.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a2902c6005212638d289e867d567e16d7" class="nameRef">mprWaitForCond</a>(<a href="#struct_mpr_cond" class="ref">MprCond</a> *cond, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Wait for a condition lock variable.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1aa523c291209f9419ad27f8b7be4e231d" class="nameRef">mprWaitForEvent</a>(<a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout, <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> mark)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Wait for an event to occur on the given dispatcher.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a050cd9b37c257aca0790ce48bc760f0b" class="nameRef">mprWaitForIO</a>(<a href="#struct_mpr_wait_service" class="ref">MprWaitService</a> *ws, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Wait for I/O.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a0b4bca5c7c7922fddc14e08213892289" class="nameRef">mprWaitForMultiCond</a>(<a href="#struct_mpr_cond" class="ref">MprCond</a> *cond, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Wait for a condition lock variable for use with multiple waiters.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a0a93f3ae8149bd4904921ffb36e493c6" class="nameRef">mprWaitForSingleIO</a>(int fd, int mask, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Wait for I/O on a file descriptor.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1aa0e15d53ab8eab3472f5a170d4e3f27b" class="nameRef">mprWaitOn</a>(<a href="#struct_mpr_wait_handler" class="ref">MprWaitHandler</a> *wp, int desiredMask)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Subscribe for desired wait events.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a808f02a00f1b4a1048d9a07124d26891" class="nameRef">mprWakeEventService</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Wake the event service.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1ad85cef853dbc0a16f343e7c720708ce8" class="nameRef">mprWriteCache</a>(<a href="#struct_mpr_cache" class="ref">MprCache</a> *cache, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value, <a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="ref">MprTime</a> modified, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> lifespan, <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> version, int options)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Write a cache item.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1aa3c9a3297a496bc567acf3c09e71596e" class="nameRef">mprWriteCmd</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, int channel, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> bufsize)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Write data to an I/O channel.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1ac355af7d14d5b35fbcbf21e067b0104e" class="nameRef">mprWriteCmdBlock</a>(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, int channel, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> bufsize)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Write data to an I/O channel.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1a48b31d54e03c997a5e6b43d070cfa4ac" class="nameRef">mprWriteFile</a>(<a href="#struct_mpr_file" class="ref">MprFile</a> *file, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> count)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Write data to a file.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1aeb6dab1b192031ce9363f10437d2499e" class="nameRef">mprWriteFileFmt</a>(<a href="#struct_mpr_file" class="ref">MprFile</a> *file, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...) PRINTF_ATTRIBUTE(2</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Write formatted data to a file.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> ssize</td><td><a href="#mpr_8h_1aef877b6efa649b5af610862cf06a3a11" class="nameRef">mprWriteFileString</a>(<a href="#struct_mpr_file" class="ref">MprFile</a> *file, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Write a string to a file.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a569224eeaff8680b96b680e3ba5dc02a" class="nameRef">mprWriteJson</a>(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value, int type)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Write a key/value in the JSON object with a string value.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a8db37813e63d921df8f5956cc453392c" class="nameRef">mprWriteJsonObj</a>(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="#struct_mpr_json" class="ref">MprJson</a> *value)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Write a property in a JSON object.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1a493014d6c3a406207003a3f40eb06843" class="nameRef">mprWritePathContents</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len, int mode)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a file and write contents.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1a125e30fab937791fc0c807461bf3c797" class="nameRef">mprWriteSocket</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Write to a socket.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1af9a6fe73adb4fb12fb998bf218b2ac61" class="nameRef">mprWriteSocketString</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Write to a string to a socket.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1a793fae1ef308f441f521dedadd9c5d4a" class="nameRef">mprWriteSocketVector</a>(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, <a href="#struct_mpr_i_o_vec" class="ref">MprIOVec</a> *iovec, int count)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Write a vector of buffers to a socket.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *</td><td><a href="#mpr_8h_1a1f563ac13a665bd5b17f3c991ae60234" class="nameRef">mprXmlGetErrorMsg</a>(<a href="#struct_mpr_xml" class="ref">MprXml</a> *xp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the XML error message if mprXmlParse fails.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a05338788d8a31a3305ec96890f1dfbde" class="nameRef">mprXmlGetLineNumber</a>(<a href="#struct_mpr_xml" class="ref">MprXml</a> *xp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the source XML line number.</td></tr>
<tr class="apiDef"><td class="apiType">void *</td><td><a href="#mpr_8h_1a0db90fdc594feb1285964afdc0d69f87" class="nameRef">mprXmlGetParseArg</a>(<a href="#struct_mpr_xml" class="ref">MprXml</a> *xp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the XML callback argument.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_mpr_xml" class="ref">MprXml</a> *</td><td><a href="#mpr_8h_1a72fb60525ced098d59ef7c79cd02b550" class="nameRef">mprXmlOpen</a>(<a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> initialSize, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> maxSize)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Open an XML parser instance.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a1341ea482faf1301d867e71575ba638a" class="nameRef">mprXmlParse</a>(<a href="#struct_mpr_xml" class="ref">MprXml</a> *xp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Run the XML parser.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a61144d35daf0b10f9f62bbd14eb106af" class="nameRef">mprXmlSetInputStream</a>(<a href="#struct_mpr_xml" class="ref">MprXml</a> *xp, <a href="#mpr_8h_1ad7d3735f6e2ef85b57904b5cce3832a4" class="ref">MprXmlInputStream</a> fn, void *arg)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Define the XML parser input stream.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a815cdc307b58663f2890711f60b690e3" class="nameRef">mprXmlSetParseArg</a>(<a href="#struct_mpr_xml" class="ref">MprXml</a> *xp, void *parseArg)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the XML callback argument.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1a015f91fb1d39230057a368fb225f45b8" class="nameRef">mprXmlSetParserHandler</a>(<a href="#struct_mpr_xml" class="ref">MprXml</a> *xp, <a href="#mpr_8h_1aa49d1c32fc1e641828bf8ffbcf675be6" class="ref">MprXmlHandler</a> h)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the XML parser data handle.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1af140a2fda18b2e8461236cc44c0a2cc4" class="nameRef">mprYield</a>(int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Signify to the garbage collector that the thread is ready for garbage collection.</td></tr>
<tr class="apiDef"><td class="apiType">void *</td><td><a href="#mpr_8h_1a8d6cb9b325abdacbaa410ea72b1f7a38" class="nameRef">palloc</a>(<a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a> size)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Allocate a &quot;permanent&quot; block of memory that is not subject GC.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1aeaa51be2edf47468d51a0c6881d5f818" class="nameRef">pfree</a>(void *ptr)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Free a &quot;permanent&quot; block of memory allocated via &quot;palloc&quot;.</td></tr>
<tr class="apiDef"><td class="apiType">void *</td><td><a href="#mpr_8h_1a22480c1aa6585a10947f840d8158fb33" class="nameRef">prealloc</a>(void *ptr, <a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a> size)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Reallocate a &quot;permanent&quot; block of memory allocated via &quot;palloc&quot;.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> ssize,ssize,ssize</td><td><a href="#mpr_8h_1a236c3aa84ff00b9943935bcc3ad783f5" class="nameRef">print</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...) PRINTF_ATTRIBUTE(1</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Print to stdout and add a trailing newline.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a></td><td><a href="#mpr_8h_1af167765e018de0c039c97817f31dc6a3" class="nameRef">psize</a>(void *ptr)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Return the size of the block.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1ab7d638edc4b0a18b2116b344b06b47b5" class="nameRef">scamel</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a camel case version of the string.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1af9cb27956141ddc4724cca9903fa69b2" class="nameRef">scaselesscmp</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Compare strings ignoring case.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1aa6a0814be845b14c9b87a717047f85ec" class="nameRef">scaselesscontains</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *pattern)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Find a pattern in a string with a caseless comparison.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a021eac46fe21719fb1f9c9d257f64280" class="nameRef">scaselessmatch</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Compare strings ignoring case.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1ad15a2ce6c7fdb207c3ad26e7bc60cb19" class="nameRef">schr</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, int c)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Find a character in a string.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1acb666da0fc979829bdfa3805d30690b8" class="nameRef">sclone</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Clone a string.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a130862b0d455d9584014457bfeb4c139" class="nameRef">scmp</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Compare strings.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a0c956f14f59854ad852e186a5691fd17" class="nameRef">scontains</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *pattern)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Find a pattern in a string.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1a96df0c576bf6004507a3d0d11e18599a" class="nameRef">scopy</a>(char *dest, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> destMax, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *src)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Copy a string.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *</td><td><a href="#mpr_8h_1a9bda617838d96d3e987c81c20616263f" class="nameRef">sends</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *suffix)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if the string ends with a given pattern.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#mpr_8h_1aa8268a9b3d82b99597f99088126f8f54" class="nameRef">serase</a>(char *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Erase the contents of a string.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1aca549ba73a2f8c4fe20ec62874028c2a" class="nameRef">sfmt</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...) PRINTF_ATTRIBUTE(1</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Format a string.</td></tr>
<tr class="apiDef"><td class="apiType">char char *</td><td><a href="#mpr_8h_1aeafcc9222db8944b862cbb73aef6039a" class="nameRef">sfmtv</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, va_list args)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Format a string.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga91ad9478d81a7aaf2593e8d9c3d06a14" class="ref">uint</a></td><td><a href="#mpr_8h_1a28eb81d75667d4866e1cf05c0ae5d3c5" class="nameRef">shash</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Compute a hash code for a string.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga91ad9478d81a7aaf2593e8d9c3d06a14" class="ref">uint</a></td><td><a href="#mpr_8h_1a0fa08b3d620074fc5959db864f0d448a" class="nameRef">shashlower</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Compute a caseless hash code for a string.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a9a07724da59f3ad7ffe2cfedf795468b" class="nameRef">sjoin</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, ...)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Catenate strings.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *</td><td><a href="#mpr_8h_1ae275c858f9b009506e13b0c9746b9751" class="nameRef">sjoinArgs</a>(int argc, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> **argv, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *sep)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Join an array of strings.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a3fa2c135b48b9c584173fd355ac0596b" class="nameRef">sjoinv</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, va_list args)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Catenate strings.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1ade405095134ad54db6dc94fcd6216961" class="nameRef">slen</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Return the length of a string.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a790b3a7ef67d4d7125eb26a8de2448b4" class="nameRef">slower</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Convert a string to lower case.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1abe7d2af6c4afc8a57904b9276a43ffea" class="nameRef">smatch</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Compare strings.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a3048479e10744453528e48099cae5542" class="nameRef">smatchsec</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Secure compare strings.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a30d6259caa94ed51abd25be83c0c4972" class="nameRef">sncaselesscmp</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Compare strings ignoring case.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1ac7b32955df45bde95b12f8d42ef54e01" class="nameRef">sncaselesscontains</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *pattern, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> limit)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Find a pattern in a string with a limit and a caseless comparison.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a86e917f9fb726d0399bc0f977d500718" class="nameRef">snclone</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Clone a substring.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#mpr_8h_1a5217429e3f1dd3731530fe287bd893a7" class="nameRef">sncmp</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Compare strings.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a298af255a2884458c4fe46c3ee320a4b" class="nameRef">sncontains</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *pattern, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> limit)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Find a pattern in a string with a limit.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1a9e34c10326cd5ffd7a9865bb224960b0" class="nameRef">sncopy</a>(char *dest, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> destMax, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *src, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Copy characters from a string.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a80f844ded2d7567f16d75bab67fd6fb1" class="nameRef">spbrk</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *set)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Locate the a character from a set in a string.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1ab380804dbe3a376a3b054b76e63a5aa1" class="nameRef">sptok</a>(char *str, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *pattern, char **last)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Tokenize a string.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a909f95ef7e493e05d6794a294f4066b7" class="nameRef">srchr</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, int c)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Find a character in a string by searching backwards.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1ad094f0c7906f4e953d0a06ea2dceb410" class="nameRef">srejoin</a>(char *buf, ...)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Append strings to an existing string and reallocate as required.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a97b7b27c2b7132a44e21f6a218ea037c" class="nameRef">srejoinv</a>(char *buf, va_list args)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Append strings to an existing string and reallocate as required.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a1098055d6e169edf28f29b216065920e" class="nameRef">ssplit</a>(char *str, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *delim, char **last)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Split a string at a delimiter.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#mpr_8h_1a812228240ff7b596dd2caaac2b9c5a35" class="nameRef">sspn</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *set)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Find the end of a spanning prefix.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#mpr_8h_1a5eec22bfd3a58a8c344d30175849f2ee" class="nameRef">sstarts</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *prefix)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if the string starts with a given pattern.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a58b9dc0d8e314b0abc98de8739ee3756" class="nameRef">ssub</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> offset, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> length)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a substring.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1aeafb6bb78fe09355365967e317889593" class="nameRef">stemplate</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, struct MprHash *tokens)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Replace template tokens in a string with values from a lookup table.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1aba79a15513be86f5951110d957da8173" class="nameRef">stemplateJson</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, struct MprJson *tokens)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Replace template tokens in a string with values from a lookup table.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a6cda5ecd6831c87de8afd3c99f266472" class="nameRef">stitle</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a Title Case version of the string.</td></tr>
<tr class="apiDef"><td class="apiType">double</td><td><a href="#mpr_8h_1a4f77165d6ba4eb33ee3ef67a910e0f4b" class="nameRef">stof</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Convert a string to a double.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a></td><td><a href="#mpr_8h_1ab24da0fe30b572a18321fa16e3dbfa19" class="nameRef">stoi</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Convert a string to an integer.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a></td><td><a href="#mpr_8h_1a851760bd4787be87c785d158892eaf82" class="nameRef">stoiradix</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, int radix, int *err)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Convert a string to an integer.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1adbeb0bae6f0eaa147eaab42666cc5fb2" class="nameRef">stok</a>(char *str, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *delim, char **last)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Tokenize a string.</td></tr>
<tr class="apiDef"><td class="apiType">struct MprList *</td><td><a href="#mpr_8h_1a34014659316038dc8b8bd6df13b3ee25" class="nameRef">stolist</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *src)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>String to list.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a75c783da24379c3ec2099f34d70dfd2c" class="nameRef">strim</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *set, int where)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Trim a string.</td></tr>
<tr class="apiDef"><td class="apiType">char *</td><td><a href="#mpr_8h_1a3a2a03da7c916044aa7d700a0f5dda48" class="nameRef">supper</a>(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Convert a string to upper case.</td></tr>
</table>
<a name="Typedefs"></a>

<h2>Typedef Index</h2>
<table class="apiIndex" title="typedefs">
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr" class="nameRef">Mpr</a></td><td class="apiBrief">Primary MPR application control structure.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_buf" class="nameRef">MprBuf</a></td><td class="apiBrief">Dynamic Buffer Module.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#mpr_8h_1ac1eae8096b0311d63a3fba54015bf1b9" class="nameRef">MprBufProc</a></td><td class="apiBrief">Buffer refill callback function.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_cache" class="nameRef">MprCache</a></td><td class="apiBrief">In-memory caching.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#mpr_8h_1af96182122f42e2c56539fb35594f985c" class="nameRef">MprCacheProc</a></td><td class="apiBrief">Cache item expiry callback.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_cmd" class="nameRef">MprCmd</a></td><td class="apiBrief">Command execution Service.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_cmd_service" class="nameRef">MprCmdService</a></td><td class="apiBrief">Command execution service.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_cond" class="nameRef">MprCond</a></td><td class="apiBrief">Condition variable for single and multi-thread synchronization.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_dir_entry" class="nameRef">MprDirEntry</a></td><td class="apiBrief">Directory entry description.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_dispatcher" class="nameRef">MprDispatcher</a></td><td class="apiBrief">Event Dispatcher.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_event" class="nameRef">MprEvent</a></td><td class="apiBrief">Event object.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#mpr_8h_1aca9cf0e331925f694232cd822ed70a56" class="nameRef">MprEventProc</a></td><td class="apiBrief">Event callback function.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_event_service" class="nameRef">MprEventService</a></td><td class="apiBrief">Event Service.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_file" class="nameRef">MprFile</a></td><td class="apiBrief">File I/O Module.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_file_system" class="nameRef">MprFileSystem</a></td><td class="apiBrief">File system service.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_float" class="nameRef">MprFloat</a></td><td class="apiBrief">Floating Point Services.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#mpr_8h_1a1f81231ad26bae17a8bf2b2fa36ed37e" class="nameRef">MprForkCallback</a></td><td class="apiBrief">Callback function before doing a fork().</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_free_mem" class="nameRef">MprFreeMem</a></td><td class="apiBrief">Block structure when on a free list.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_free_queue" class="nameRef">MprFreeQueue</a></td><td class="apiBrief">Free queue head structure.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_hash" class="nameRef">MprHash</a></td><td class="apiBrief">Hash table control structure.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#mpr_8h_1aa9cd2db453ee649412b1003cfcce710c" class="nameRef">MprHashProc</a></td><td class="apiBrief">Hashing function to use for the table.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_heap" class="nameRef">MprHeap</a></td><td class="apiBrief">Memory allocator heap.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_i_o_vec" class="nameRef">MprIOVec</a></td><td class="apiBrief">Vectored write array.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_json" class="nameRef">MprJson</a></td><td class="apiBrief">JSON Object.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_json_callback" class="nameRef">MprJsonCallback</a></td><td class="apiBrief">JSON parsing callbacks.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_json_parser" class="nameRef">MprJsonParser</a></td><td class="apiBrief">JSON parser.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_key" class="nameRef">MprKey</a></td><td class="apiBrief">Hash table entry structure.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_key_value" class="nameRef">MprKeyValue</a></td><td class="apiBrief">Key value pairs for use with <a class="ref" href="#struct_mpr_list">MprList</a> or <a class="ref" href="#struct_mpr_key">MprKey</a></td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_list" class="nameRef">MprList</a></td><td class="apiBrief">List data structure.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#mpr_8h_1a06e53583e17e8a5803d1bdabf523e827" class="nameRef">MprListCompareProc</a></td><td class="apiBrief">List comparison procedure for sorting.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_log" class="nameRef">MprLog</a></td><td class="apiBrief">Logging Services.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#mpr_8h_1a8fdb97b78014d2a084a4747a35b3235a" class="nameRef">MprLogHandler</a></td><td class="apiBrief">Log handler callback type.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#mpr_8h_1ad5e84d898dd29853b54cc1b49fcb4041" class="nameRef">MprManager</a></td><td class="apiBrief"><a class="ref" href="#struct_mpr">Mpr</a> memory block manager prototype.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_mem" class="nameRef">MprMem</a></td><td class="apiBrief">Memory Allocation Service.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#mpr_8h_1ac7be61c63c8a92243c67986431c48083" class="nameRef">MprMemNotifier</a></td><td class="apiBrief">Memory allocation error callback.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_mem_stats" class="nameRef">MprMemStats</a></td><td class="apiBrief">Memory allocator statistics.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_mime" class="nameRef">MprMime</a></td><td class="apiBrief">Mime Type hash table entry (the URL extension is the key).</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_module" class="nameRef">MprModule</a></td><td class="apiBrief">Loadable Module Service.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#mpr_8h_1ac3925ae824a9d13aacc476ba20341925" class="nameRef">MprModuleEntry</a></td><td class="apiBrief">Loadable module entry point signature.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#mpr_8h_1a98c47ddbb625a457617163f7aeeb0edb" class="nameRef">MprModuleProc</a></td><td class="apiBrief">Module start/stop point function signature.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_module_service" class="nameRef">MprModuleService</a></td><td class="apiBrief">Loadable module service.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_mutex" class="nameRef">MprMutex</a></td><td class="apiBrief">Multithreading lock control structure.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#mpr_8h_1a87e9f435008723c7b1489af1944c6e20" class="nameRef">MprOff</a></td><td class="apiBrief">Signed file offset data type.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_path" class="nameRef">MprPath</a></td><td class="apiBrief">Path (filename) Information.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_region" class="nameRef">MprRegion</a></td><td class="apiBrief">Memmory regions allocated from the O/S.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_rom_inode" class="nameRef">MprRomInode</a></td><td class="apiBrief">A RomInode is created for each file in the Rom file system.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_signal" class="nameRef">MprSignal</a></td><td class="apiBrief">Signal control structure.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_signal_info" class="nameRef">MprSignalInfo</a></td><td class="apiBrief">Per signal structure.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#mpr_8h_1ac4a10702a0dc44988261064f0ec18dd8" class="nameRef">MprSignalProc</a></td><td class="apiBrief">Signal callback procedure.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_signal_service" class="nameRef">MprSignalService</a></td><td class="apiBrief">Signal service control.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_socket" class="nameRef">MprSocket</a></td><td class="apiBrief">Socket Service.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#mpr_8h_1a3105b7eaf43b2c002e520aa4a870fdee" class="nameRef">MprSocketPrebind</a></td><td class="apiBrief">Callback before binding a socket.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#mpr_8h_1ac7bad8a3b219b43b6b3be36c7ff25d2c" class="nameRef">MprSocketProc</a></td><td class="apiBrief">Socket I/O callback procedure.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_socket_provider" class="nameRef">MprSocketProvider</a></td><td class="apiBrief">Socket service provider interface.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_socket_service" class="nameRef">MprSocketService</a></td><td class="apiBrief"><a class="ref" href="#struct_mpr">Mpr</a> socket service class.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#mpr_8h_1a69516d3096bf8d921a5348af8ce7ebde" class="nameRef">MprSortProc</a></td><td class="apiBrief">Quicksort callback function.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_spin" class="nameRef">MprSpin</a></td><td class="apiBrief">Multithreading spin lock control structure.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_ssl" class="nameRef">MprSsl</a></td><td class="apiBrief">SSL control structure.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_string" class="nameRef">MprString</a></td><td class="apiBrief">Safe String Module.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_sync" class="nameRef">MprSync</a></td><td class="apiBrief">Multithreaded Synchronization Services.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#mpr_8h_1a4b92b1380a1bcb694131c104e1062c4f" class="nameRef">MprTerminator</a></td><td class="apiBrief">Service shutdown notifier.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_thread" class="nameRef">MprThread</a></td><td class="apiBrief">Thread Service.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_thread_local" class="nameRef">MprThreadLocal</a></td><td class="apiBrief">Thread local data storage.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#mpr_8h_1a48c1189e15feb2e337536ab8f562284a" class="nameRef">MprThreadProc</a></td><td class="apiBrief">Thread main procedure.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_thread_service" class="nameRef">MprThreadService</a></td><td class="apiBrief">Thread service.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="nameRef">MprTicks</a></td><td class="apiBrief">Elapsed time data type.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="nameRef">MprTime</a></td><td class="apiBrief">Date and Time Service.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_wait_handler" class="nameRef">MprWaitHandler</a></td><td class="apiBrief">Wait Handler Service.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_wait_service" class="nameRef">MprWaitService</a></td><td class="apiBrief">Wait Service.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_worker" class="nameRef">MprWorker</a></td><td class="apiBrief">Worker thread structure.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#mpr_8h_1a6c2bc16deb84f2893c1935deb94bec29" class="nameRef">MprWorkerProc</a></td><td class="apiBrief">Worker thread callback signature.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_worker_service" class="nameRef">MprWorkerService</a></td><td class="apiBrief">Worker Thread Service.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_worker_stats" class="nameRef">MprWorkerStats</a></td><td class="apiBrief">Statistics for Workers.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_mpr_xml" class="nameRef">MprXml</a></td><td class="apiBrief">Per XML session structure.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#mpr_8h_1aa49d1c32fc1e641828bf8ffbcf675be6" class="nameRef">MprXmlHandler</a></td><td class="apiBrief">XML callback handler.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#mpr_8h_1ad7d3735f6e2ef85b57904b5cce3832a4" class="nameRef">MprXmlInputStream</a></td><td class="apiBrief">XML input stream function.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#mpr_8h_1af9381320a2640ea84038579d8f143c01" class="nameRef">Socket</a></td><td class="apiBrief">Argument for sockets.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="nameRef">size_t</a></td><td class="apiBrief">Unsigned integral type.</td></tr>
</table>
<a name="Defines"></a>

<h2>Defines</h2>
<table class="apiIndex" title="Defines">
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1af821420781729d00310228b21dc11aea" class="nameRef">ME_MAX_EVENTS</a>&nbsp;&nbsp;&nbsp;32</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Maximum number of notifier events.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a436e5e0d6abaa12fa9d768f1b88fb46c" class="nameRef">ME_MPR_ALLOC_TRACE</a>&nbsp;&nbsp;&nbsp;0</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Trace to stdout.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1af8ebacbfd3978c3b12cef8c9f7b7db11" class="nameRef">ME_MPR_LOGGING</a>&nbsp;&nbsp;&nbsp;1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Default for logging is &quot;on&quot;.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a9d90dbb86522baf78c10b9aa51078770" class="nameRef">ME_MPR_MAX_PASSWORD</a>&nbsp;&nbsp;&nbsp;256</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Max password length.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a3a04c8a4de06cc2518684a7289a15cd9" class="nameRef">MPR_ALLOC_HOLD</a>&nbsp;&nbsp;&nbsp;0x4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Allocate and hold <ndash/> immune from GC until mprRelease.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a0fdfeef976b9c763e5e311d126752e59" class="nameRef">MPR_ALLOC_MANAGER</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Reserve room for a manager.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a065c472c2b2b6788e97aa947c2875d14" class="nameRef">MPR_ALLOC_PAD_MASK</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Flags that impact padding.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ab0142929f5c96aeb7f5a67a137204059" class="nameRef">MPR_ALLOC_POLICY_ABORT</a>&nbsp;&nbsp;&nbsp;4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Abort the app and dump core.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a078cbfd3dec0112f75123ad13efe46ef" class="nameRef">MPR_ALLOC_POLICY_EXIT</a>&nbsp;&nbsp;&nbsp;3</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Exit the app cleanly.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ada97b225f9f382f841a548fe2a752fbf" class="nameRef">MPR_ALLOC_POLICY_NOTHING</a>&nbsp;&nbsp;&nbsp;0</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Do nothing.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a4986b34cbf20314d3871050732b0757f" class="nameRef">MPR_ALLOC_POLICY_PRUNE</a>&nbsp;&nbsp;&nbsp;1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Prune all non-essential memory and continue.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ae398692bd035c07c68e2942523239154" class="nameRef">MPR_ALLOC_POLICY_RESTART</a>&nbsp;&nbsp;&nbsp;2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Gracefully restart the app.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a301990b4bf54f26f6e8f70fb2ac4e8b7" class="nameRef">MPR_ALLOC_ZERO</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Zero memory.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a9653be8fce6f8c186ed357310b64b336" class="nameRef">MPR_ARGV_ARGS_ONLY</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Command is missing program name.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a5e2e7058ae62846bc72aa87a94998e35" class="nameRef">MPR_BACKGROUND_PRIORITY</a>&nbsp;&nbsp;&nbsp;15</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>May only get CPU if idle.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ac198d9d7c49a8c4b6e6770119437054c" class="nameRef">MPR_CACHE_ADD</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>mprWriteCache option to add key only if not already existing.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a2282b63defc144dc2c8877014b746130" class="nameRef">MPR_CACHE_APPEND</a>&nbsp;&nbsp;&nbsp;0x8</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>mprWriteCache option to set and append if already existing.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a7ec43d5dbf59e707546bca9d19746dbe" class="nameRef">MPR_CACHE_NOTIFY_CREATE</a>&nbsp;&nbsp;&nbsp;1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Item has been created.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a911a8fb4a9038af625719cfc408e75f3" class="nameRef">MPR_CACHE_NOTIFY_REMOVE</a>&nbsp;&nbsp;&nbsp;2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Item is about to be removed.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a53f2f17fa896c01f34ddc47142401642" class="nameRef">MPR_CACHE_NOTIFY_UPDATE</a>&nbsp;&nbsp;&nbsp;4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Item has been updated.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a21ba7373200a15b53e7e027fd446ff16" class="nameRef">MPR_CACHE_PREPEND</a>&nbsp;&nbsp;&nbsp;0x10</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>mprWriteCache option to set and prepend if already existing.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a6fc9fc42118cf01738a7f1d8242d2b2a" class="nameRef">MPR_CACHE_SET</a>&nbsp;&nbsp;&nbsp;0x4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>mprWriteCache option to update key value, create if required.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1aa79b26057bf373035743f9fb36b1620e" class="nameRef">MPR_CACHE_SHARED</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Use shared cache for <a class="ref" href="#mpr_8h_1a723be1009e7b9cd130cc53f2f3545e94">mprCreateCache()</a></td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a4df4f9865c8aa6bcc37bbce0d004b2d1" class="nameRef">MPR_CG_DEFAULT</a>&nbsp;&nbsp;&nbsp;0x0</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>mprGC flag to run GC if necessary.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a52dbd009cf7a2084be51ec5e9905bef1" class="nameRef">MPR_CMD_DETACH</a>&nbsp;&nbsp;&nbsp;0x4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>mprRunCmd flag to detach the child process and don&apos;t wait.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a9b6df9f53de6ce7f036a88eb57c4bdc4" class="nameRef">MPR_CMD_ERR</a>&nbsp;&nbsp;&nbsp;0x4000</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>mprRunCmd flag to capture stdout.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ab462f92f7490dbb1c373576813d3bf3a" class="nameRef">MPR_CMD_EXACT_ENV</a>&nbsp;&nbsp;&nbsp;0x8</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>mprRunCmd flag to use the exact environment (no inherit from parent).</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ad1983e4ebe978cc183518345b1b4f287" class="nameRef">MPR_CMD_IN</a>&nbsp;&nbsp;&nbsp;0x1000</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>mprRunCmd flag to connect to stdin.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a5b23440bb399d549cc8e21cf843f5e8a" class="nameRef">MPR_CMD_NEW_SESSION</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>mprRunCmd flag to create a new session on unix.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ae0f5f7ba09817ec63dfb062ec9aef746" class="nameRef">MPR_CMD_OUT</a>&nbsp;&nbsp;&nbsp;0x2000</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>mprRunCmd flag to capture stdout.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a5a431633c20c5ba9cb82245bb35cb970" class="nameRef">MPR_CMD_SHOW</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>mprRunCmd flag to show the window of the created process on windows.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a8be319d56d0cb412db373c5a056084a4" class="nameRef">MPR_CMD_STDERR</a>&nbsp;&nbsp;&nbsp;2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Stderr for the client side.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a622d43589bbed6dc91ad21764e718bd9" class="nameRef">MPR_CMD_STDIN</a>&nbsp;&nbsp;&nbsp;0</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Stdout for the client side.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a8ef3ba4052c1e6dbdf5437c2d99a2178" class="nameRef">MPR_CMD_STDOUT</a>&nbsp;&nbsp;&nbsp;1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Stdin for the client side.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a5b9e93e828d28c4f7af302fadfa82bec" class="nameRef">MPR_CMD_VXWORKS_EOF</a>&nbsp;&nbsp;&nbsp;&quot;_ _EOF_ _&quot;</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Special string for VxWorks CGI to emit to signal EOF.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a297d74edde17d0138542113ef5f47175" class="nameRef">MPR_CMD_VXWORKS_EOF_LEN</a>&nbsp;&nbsp;&nbsp;9</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Length of MPR_CMD_VXWORKS_EOF.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a9b20fa4a74b7f9d436be9abd7f980106" class="nameRef">MPR_CREATED</a>&nbsp;&nbsp;&nbsp;1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Applicationa and MPR services started.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ae06415ae3af35c8ac27f34b10d3001e3" class="nameRef">MPR_CRITICAL_PRIORITY</a>&nbsp;&nbsp;&nbsp;99</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>May not yield.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ad1645441f4f2593704607bcaf695c0cb" class="nameRef">MPR_DAEMON</a>&nbsp;&nbsp;&nbsp;0x10</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Make the process a daemon.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1acbb0af96c8a7015a479fb63e014a6b02" class="nameRef">MPR_DECODE_TOKEQ</a>&nbsp;&nbsp;&nbsp;1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Decode base 64 blocks up to a NULL or equals.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ac9fb49d5056d0731ac706c507d31d4e2" class="nameRef">MPR_DEFAULT_DATE</a>&nbsp;&nbsp;&nbsp;&quot;%a %b %d %T %Y %Z&quot;</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Default date format used in mprFormatLocalTime/mprFormatUniversalTime when no format supplied.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1aefea53f554fcb794283095d3b96c34bd" class="nameRef">MPR_DEFAULT_MAX_THREADS</a>&nbsp;&nbsp;&nbsp;5</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Default max threads.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a73941169dddea56ea21e373e25d6f630" class="nameRef">MPR_DEFAULT_MIN_THREADS</a>&nbsp;&nbsp;&nbsp;0</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Default min threads.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ad957b8831fcd63137def593388ee9f73" class="nameRef">MPR_DELAY_GC_THREAD</a>&nbsp;&nbsp;&nbsp;0x8</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Delay starting the GC thread.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a841f0e6572685f21ee34a805e18d2c7d" class="nameRef">MPR_DESTROYED</a>&nbsp;&nbsp;&nbsp;6</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Application and MPR object destroyed <br/></td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a55257578875234da846db3904da5aa80" class="nameRef">MPR_DESTROYING</a>&nbsp;&nbsp;&nbsp;5</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Destroying core MPR services and releasing memory.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1acbca6bd804a91e8cf0ed731c1a2d35af" class="nameRef">MPR_DISABLE_GC</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Disable GC.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ab0f3013da15539678a4c591e5ec15298" class="nameRef">MPR_DISPATCHER_AUTO</a>&nbsp;&nbsp;&nbsp;0x8</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Dispatcher was auto created in response to accept event.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a125b0207b56f4d575518f349f532e3a7" class="nameRef">MPR_DISPATCHER_COMPLETE</a>&nbsp;&nbsp;&nbsp;0x10</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Test operation is complete.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a011e95e5bb1031a865f4dea64af4452c" class="nameRef">MPR_DISPATCHER_DESTROYED</a>&nbsp;&nbsp;&nbsp;0x4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Dispatcher has been destroyed.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a92e502bdbb4fcca5242f0a6307b7e729" class="nameRef">MPR_DISPATCHER_IMMEDIATE</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Dispatcher should run using the service events thread.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a14c2e4d083c860836c2d2ee97f960a58" class="nameRef">MPR_DISPATCHER_WAITING</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Dispatcher waiting for an event in mprWaitForEvent.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a4b27e0a286fd6975d08929c2ef931ab6" class="nameRef">MPR_ERR</a>&nbsp;&nbsp;&nbsp;-1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Default error code.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a5e8036f0bee810b7d0a3fa6a752c77b2" class="nameRef">MPR_ERR_ABORTED</a>&nbsp;&nbsp;&nbsp;-2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Action aborted.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a0a19880d5b8b35cbd243601c3fdebc9a" class="nameRef">MPR_ERR_ALREADY_EXISTS</a>&nbsp;&nbsp;&nbsp;-3</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Item already exists.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a919966956e7462c38d2a1575c32d9948" class="nameRef">MPR_ERR_BAD_ARGS</a>&nbsp;&nbsp;&nbsp;-4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Bad arguments or paramaeters.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a930ee0c1f493bf582c968c45b1670e3d" class="nameRef">MPR_ERR_BAD_FORMAT</a>&nbsp;&nbsp;&nbsp;-5</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Bad input format.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a4ca018e825a5209d1c781df4f6e7fcfb" class="nameRef">MPR_ERR_BAD_HANDLE</a>&nbsp;&nbsp;&nbsp;-6</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Bad file handle.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ac23aecc1451d49a5b30ec93eef8a82fa" class="nameRef">MPR_ERR_BAD_STATE</a>&nbsp;&nbsp;&nbsp;-7</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Module is in a bad state.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1aba09adbb870ee2f433345e2f149e7170" class="nameRef">MPR_ERR_BAD_SYNTAX</a>&nbsp;&nbsp;&nbsp;-8</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Input has bad syntax.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a68f2a1f86291ce6956ea1d8ff659f247" class="nameRef">MPR_ERR_BAD_TYPE</a>&nbsp;&nbsp;&nbsp;-9</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Bad object type.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a37d3461f89eba4f41854fca0374a3440" class="nameRef">MPR_ERR_BAD_VALUE</a>&nbsp;&nbsp;&nbsp;-10</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Bad or unexpected value.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a062b42b45d20dc6e53bbd50d56f7becf" class="nameRef">MPR_ERR_BASE</a>&nbsp;&nbsp;&nbsp;-1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Base error code.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a4489b24d6bd60c91a0caf473949cd22c" class="nameRef">MPR_ERR_BUSY</a>&nbsp;&nbsp;&nbsp;-11</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Resource is busy.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a2223fd269b22204735c86aedfb75498d" class="nameRef">MPR_ERR_CANT_ACCESS</a>&nbsp;&nbsp;&nbsp;-12</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Cannot access the file or resource.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1af37872c7dc5bd324d7257b0c182a5698" class="nameRef">MPR_ERR_CANT_ALLOCATE</a>&nbsp;&nbsp;&nbsp;-13</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Cannot allocate resource.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ac76e95eb4e012fdc44ddb139714d40ee" class="nameRef">MPR_ERR_CANT_COMPLETE</a>&nbsp;&nbsp;&nbsp;-14</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Operation cannot complete.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a1caca544ac924457005fbfb83212687b" class="nameRef">MPR_ERR_CANT_CONNECT</a>&nbsp;&nbsp;&nbsp;-15</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Cannot connect to network or resource.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a9d015f30b291c6ddc172ee8401626201" class="nameRef">MPR_ERR_CANT_CREATE</a>&nbsp;&nbsp;&nbsp;-16</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Cannot create the file or resource.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1aac57866d33362bf21f652bd77d607550" class="nameRef">MPR_ERR_CANT_DELETE</a>&nbsp;&nbsp;&nbsp;-17</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Cannot delete the resource.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a6fa5a9e876d9ebca6964b78f1f1590c9" class="nameRef">MPR_ERR_CANT_FIND</a>&nbsp;&nbsp;&nbsp;-18</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Cannot find resource.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a533ed601a14817b24a8d8c000ab4ecf3" class="nameRef">MPR_ERR_CANT_INITIALIZE</a>&nbsp;&nbsp;&nbsp;-19</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Cannot initialize resource.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ae8dc577ad8255580ce59647897fc6b16" class="nameRef">MPR_ERR_CANT_LOAD</a>&nbsp;&nbsp;&nbsp;-20</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Cannot load the resource.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a293c82c9a0891e2dcfd18caf2f515b87" class="nameRef">MPR_ERR_CANT_OPEN</a>&nbsp;&nbsp;&nbsp;-21</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Cannot open the file or resource.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a4dad0ac2657323d3e0790744560d4404" class="nameRef">MPR_ERR_CANT_READ</a>&nbsp;&nbsp;&nbsp;-22</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Cannot read from the file or resource.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1af8d350a5d245956ba8d0e6f461906d51" class="nameRef">MPR_ERR_CANT_WRITE</a>&nbsp;&nbsp;&nbsp;-23</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Cannot write to the file or resource.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1aa82e6a65a7fc1ebeb32782cddaf74dcf" class="nameRef">MPR_ERR_DELETED</a>&nbsp;&nbsp;&nbsp;-24</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Resource has been deleted.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ab459d8da7f8309dcb3bdc8087a327b23" class="nameRef">MPR_ERR_MEMORY</a>&nbsp;&nbsp;&nbsp;-25</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Memory allocation error.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1abce7cf0b20e11f626c6e7269c7f57585" class="nameRef">MPR_ERR_NETWORK</a>&nbsp;&nbsp;&nbsp;-26</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Underlying network error.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1add3e5f02d6a87f8d974978e7a1bae790" class="nameRef">MPR_ERR_NOT_INITIALIZED</a>&nbsp;&nbsp;&nbsp;-27</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Module or resource is not initialized.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a44c8cadbefc4c0ebc5a6d50fe0a2b35a" class="nameRef">MPR_ERR_NOT_READY</a>&nbsp;&nbsp;&nbsp;-28</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Resource is not ready.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a9f0e4f45ab378cf38c97d1f82ae97977" class="nameRef">MPR_ERR_OK</a>&nbsp;&nbsp;&nbsp;0</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Success.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a1d01a181e24b717f7e8cc209ecf9a1fd" class="nameRef">MPR_ERR_READ_ONLY</a>&nbsp;&nbsp;&nbsp;-29</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The operation timed out.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a5a93a590163db7efac72b4cdf1167028" class="nameRef">MPR_ERR_TIMEOUT</a>&nbsp;&nbsp;&nbsp;-30</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Operation exceeded specified time allowed.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a286d20a366b521bef2f888acb869ad32" class="nameRef">MPR_ERR_TOO_MANY</a>&nbsp;&nbsp;&nbsp;-31</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Too many requests or resources.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a8e1a65eca999545a890045c42f0c02a8" class="nameRef">MPR_ERR_WONT_FIT</a>&nbsp;&nbsp;&nbsp;-32</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Requested operation won&apos;t fit in available space.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a03982e4028ce99a027b8ec4de803789f" class="nameRef">MPR_ERR_WOULD_BLOCK</a>&nbsp;&nbsp;&nbsp;-33</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Blocking operation would block.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a83b40d1c6e1752448e424c3ba1acc3fa" class="nameRef">MPR_EVENT_ALWAYS</a>&nbsp;&nbsp;&nbsp;0x10</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Always invoke the callback even if the event not run <br/></td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1aa75b23385a68cbe6d21e4fdb8ca72d1f" class="nameRef">MPR_EVENT_ASYNC</a>&nbsp;&nbsp;&nbsp;1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Windows async select.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a207b6b4c4dd69cefc5d48e0898677ff1" class="nameRef">MPR_EVENT_CONTINUOUS</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Timer event runs is automatically rescheduled.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ac32b25ad7f171f1e1d88f24ac6394b21" class="nameRef">MPR_EVENT_DONT_QUEUE</a>&nbsp;&nbsp;&nbsp;0x4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Don&apos;t queue the event.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a35751841ed0361d40361c375bca122a4" class="nameRef">MPR_EVENT_EPOLL</a>&nbsp;&nbsp;&nbsp;2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>epoll_wait.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a9cf11fdbc5ec554791085628014ce354" class="nameRef">MPR_EVENT_KQUEUE</a>&nbsp;&nbsp;&nbsp;3</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>BSD kqueue.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a1eb34fbfbb270fe2c33cd52afc71b0f3" class="nameRef">MPR_EVENT_LOCAL</a>&nbsp;&nbsp;&nbsp;0x20</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Invoked from an MPR local thread.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a2a99bacd6ebae3f038383bf28e9c9b80" class="nameRef">MPR_EVENT_PRIORITY</a>&nbsp;&nbsp;&nbsp;50</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Normal priority.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1af74cd819692aad055f0301c0bf01c73c" class="nameRef">MPR_EVENT_QUICK</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Execute inline without executing via a thread.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1af178ffbd32723f67ab58ca731a4c3db7" class="nameRef">MPR_EVENT_SELECT</a>&nbsp;&nbsp;&nbsp;4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>traditional select().</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1adc36e5173a2a5c9baee5070f9aa051f7" class="nameRef">MPR_EVENT_SELECT_PIPE</a>&nbsp;&nbsp;&nbsp;5</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Select with pipe for wakeup.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a58e11a0fe2de721fd742aa6c601ff8e4" class="nameRef">MPR_EVENT_STATIC_DATA</a>&nbsp;&nbsp;&nbsp;0x8</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Event data is permanent and should not be marked by GC.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ac9caa92980fc78d01d0899c46ad35331" class="nameRef">MPR_EVENT_TIME_SLICE</a>&nbsp;&nbsp;&nbsp;20          /* 20 msec */</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Events.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a68c871907199435842d3874d7b580240" class="nameRef">MPR_EXIT_ABORT</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Abort everything and call exit().</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ab66db1e667041ab60b61aea991e20250" class="nameRef">MPR_EXIT_NORMAL</a>&nbsp;&nbsp;&nbsp;0x0</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Normal (graceful) exit.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a2328bae311be87e903b6d9df39d607b4" class="nameRef">MPR_EXIT_RESTART</a>&nbsp;&nbsp;&nbsp;0x4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Restart after exiting.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a1494c42c3e704a708b937ca6ece37531" class="nameRef">MPR_EXIT_SAFE</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Graceful shutdown only if all requests complete.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ae0673073d2a8d3382a0ee082675c2148" class="nameRef">MPR_EXIT_TIMEOUT</a>&nbsp;&nbsp;&nbsp;-1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Use timeout specified via <a class="ref" href="#mpr_8h_1a278ee775a1c2e956d09a4683e778caea">mprSetExitTimeout</a></td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a63bdc4d8799bf974274a81b7398c6ea7" class="nameRef">MPR_GC_COMPLETE</a>&nbsp;&nbsp;&nbsp;0x4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>mprGC flag to force start a GC and wait until the GC cycle fully completes including sweep phase.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ad7a1c9b321dcaee1529f4c2af57988dc" class="nameRef">MPR_GC_FORCE</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>mprGC flag to force start a GC sweep whether it is required or not.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a8a253ad9c573aa28d72e1117a7f93afe" class="nameRef">MPR_GC_NO_BLOCK</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>mprGC flag to run GC if ncessary and return without yielding.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a344e3e004369537b4ba70eab1303c807" class="nameRef">MPR_HASH_CASELESS</a>&nbsp;&nbsp;&nbsp;0x10</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Key comparisons ignore case.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a7bc4fa2331e5370e2190f9dcb1f20c2f" class="nameRef">MPR_HASH_MANAGED_KEYS</a>&nbsp;&nbsp;&nbsp;0x100</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Keys are managed - mark but don&apos;t dup.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a785abf55108afb713ef58811d47596ab" class="nameRef">MPR_HASH_MANAGED_VALUES</a>&nbsp;&nbsp;&nbsp;0x200</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Values are managed - mark but don&apos;t dup.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1aca215f7078aefef2f0f9e59db6d39c98" class="nameRef">MPR_HASH_STABLE</a>&nbsp;&nbsp;&nbsp;0x800</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Contents are stable or only accessed by one thread.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a4b4def421c22a58a925f617230ddb1ac" class="nameRef">MPR_HASH_STATIC_KEYS</a>&nbsp;&nbsp;&nbsp;0x40</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Keys are permanent - don&apos;t dup or mark.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1adfe26c7f675b90c3672e58e68572aaae" class="nameRef">MPR_HASH_STATIC_VALUES</a>&nbsp;&nbsp;&nbsp;0x80</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Values are permanent - don&apos;t mark.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a0bf11498863580da02169e0ae6d798da" class="nameRef">MPR_HASH_UNICODE</a>&nbsp;&nbsp;&nbsp;0x20</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Hash keys are unicode strings.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ab63883c0a9cddb7697ef649141d0553c" class="nameRef">MPR_HASH_UNIQUE</a>&nbsp;&nbsp;&nbsp;0x400</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Add to existing will fail.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a4de2c3f94ca0f0e9806af2ed5b645829" class="nameRef">MPR_HTTP_DATE</a>&nbsp;&nbsp;&nbsp;&quot;%a, %d %b %Y %T GMT&quot;</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Date format for use in HTTP (headers).</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a2b1ef14203f71b74eba095eab95d71d2" class="nameRef">MPR_JSON_APPEND</a>&nbsp;&nbsp;&nbsp;0x4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Default to append to existing &apos;+&apos; (default).</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a9cc3a837cf3aa6011f170ad1bb5d0600" class="nameRef">MPR_JSON_ARRAY</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The property is an array.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1aa2de7fdcae9f8f06b0937753a5d0a267" class="nameRef">MPR_JSON_COMBINE</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Combine properties using &apos;+&apos; &apos;-&apos; &apos;=&apos; &apos;?&apos; prefixes.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1af2f5b7a271c166ad4808bce83c05be33" class="nameRef">MPR_JSON_CREATE</a>&nbsp;&nbsp;&nbsp;0x10</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Create if not already existing &apos;?&apos;.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a65f48ffcfcc5efa8d1b20c29dd2bd562" class="nameRef">MPR_JSON_DATA_TYPE</a>&nbsp;&nbsp;&nbsp;0xFF8</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Mask for core type of obj (obj|array|value).</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a249d8f79212a5fe73b73d00073a504d2" class="nameRef">MPR_JSON_ENCODE_TYPES</a>&nbsp;&nbsp;&nbsp;0x8</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Encode dates and regexp with {type:date} or {type:regexp}.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a7d1e23b3a30abea486e42b6e187fe4b5" class="nameRef">MPR_JSON_FALSE</a>&nbsp;&nbsp;&nbsp;0x8</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The property is false.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a2500e6a5ecd958cdad437318df55b323" class="nameRef">MPR_JSON_NULL</a>&nbsp;&nbsp;&nbsp;0x10</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The property is null.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a75ee51d1189304b252d94f371ca0933a" class="nameRef">MPR_JSON_NUMBER</a>&nbsp;&nbsp;&nbsp;0x20</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The property is a number.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ae525a33d8689c5f902c07f1d84306b00" class="nameRef">MPR_JSON_OBJ</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The property is an object.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a3d7904b32c3711f627dba3d39f3b9bad" class="nameRef">MPR_JSON_OBJ_TYPE</a>&nbsp;&nbsp;&nbsp;0x7</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Mask for core type of obj (obj|array|value).</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a9733076cb9f464d68a2ab37b67dcd3f2" class="nameRef">MPR_JSON_OVERWRITE</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Default to overwrite existing properties &apos;=&apos;.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1aae2fe1acabe071d47c5ec2ac436880bc" class="nameRef">MPR_JSON_PRETTY</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Serialize output in a more human readable, multiline &quot;pretty&quot; format.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1aace5d01cd369cd4131594f413b5487c7" class="nameRef">MPR_JSON_QUOTES</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Serialize output quoting keys.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ac7760f7003949181881385400bc4aff0" class="nameRef">MPR_JSON_REGEXP</a>&nbsp;&nbsp;&nbsp;0x40</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The property is a regular expression.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a5609d37c5e5de9e42bb4082289e24dd8" class="nameRef">MPR_JSON_REPLACE</a>&nbsp;&nbsp;&nbsp;0x8</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Replace existing properties &apos;-&apos;.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a4467d3d2849e564e096cd66e96e43d87" class="nameRef">MPR_JSON_STRING</a>&nbsp;&nbsp;&nbsp;0x80</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The property is a string.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a10a439d186a71df88aa4129a10c5417f" class="nameRef">MPR_JSON_STRINGS</a>&nbsp;&nbsp;&nbsp;0x4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Emit all values as quoted strings.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a68d0ce9b3c807a6c6ec1d57b40b98f7a" class="nameRef">MPR_JSON_TRUE</a>&nbsp;&nbsp;&nbsp;0x100</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The property is true.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a8c09a4f46800daaee483367b1907c25d" class="nameRef">MPR_JSON_UNDEFINED</a>&nbsp;&nbsp;&nbsp;0x200</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The property is undefined.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a76f3a59d41d8b7823cdefa2dc50a017e" class="nameRef">MPR_JSON_VALUE</a>&nbsp;&nbsp;&nbsp;0x4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The property is a value (false|true|null|undefined|regexp|number|string) <br/></td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a7e0930a91bd30665bf00a6354e836b27" class="nameRef">MPR_LIST_STABLE</a>&nbsp;&nbsp;&nbsp;0x40</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Contents are stable or only accessed by one thread.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ad6c828f6e108fa0f7d6904c4dad515c1" class="nameRef">MPR_LIST_STATIC_VALUES</a>&nbsp;&nbsp;&nbsp;0x20</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Flag for <a class="ref" href="#mpr_8h_1aad013e1bb3447a42920f013eceebf174">mprCreateList</a> when values are permanent.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a36a5ad5dd31abb5254888a1928b42498" class="nameRef">MPR_LOCAL_TIMEZONE</a>&nbsp;&nbsp;&nbsp;MAXINT</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Constants for mprParseTime.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a6673edd70b7227b524b05ad21e753be0" class="nameRef">MPR_LOG_ANEW</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Start anew on restart after backup.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1aa200568b3ecd710321e791e3273a8121" class="nameRef">MPR_LOG_CMDLINE</a>&nbsp;&nbsp;&nbsp;0x4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Command line log switch uses.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ac1db3b9b54fcbf6b53d1e0f44d9169df" class="nameRef">MPR_LOG_CONFIG</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Show the configuration at the start of the log.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a537ee40d6d6477bd6b661dd22754f081" class="nameRef">MPR_LOG_DATE</a>&nbsp;&nbsp;&nbsp;&quot;%D %T&quot;</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Date for use in log files (compact).</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a4d66e1bf6c8fd935dcc0934a2535eb10" class="nameRef">MPR_LOG_DETAILED</a>&nbsp;&nbsp;&nbsp;0x8</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Use detailed log formatting with timestamps and tags.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a6be66c6df835c0424a74f0fffa9c7e53" class="nameRef">MPR_LOG_HEXDUMP</a>&nbsp;&nbsp;&nbsp;0x10</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Emit hexdump.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1afee33573c71301f6cff682eb427c8ed4" class="nameRef">MPR_LOG_TAGGED</a>&nbsp;&nbsp;&nbsp;0x10</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Use tagged message formatting.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a6f1f0ed71ed5a6ee0089d4b5c0cd301e" class="nameRef">MPR_MANAGE_FREE</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Block being freed.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ab89208f2cda3c60413ccbc67c9ae567d" class="nameRef">MPR_MANAGE_MARK</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Block being marked by GC.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1aa0b8717f01a9a8cb31d3c5c2d950f612" class="nameRef">MPR_MAX_FILE</a>&nbsp;&nbsp;&nbsp;256</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Maximum number of files to close when forking.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a80cba2f2518b3cbbfdc6537d9e4a40d9" class="nameRef">MPR_MEM_FAIL</a>&nbsp;&nbsp;&nbsp;0x4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Memory allocation failed - immediate exit.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a32c694e15c93073531649ca79332bc9b" class="nameRef">MPR_MEM_LIMIT</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Memory use exceeds memory limit - invoking policy.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a4fcb58aae6632033517d940deb1c3f2a" class="nameRef">MPR_MEM_TOO_BIG</a>&nbsp;&nbsp;&nbsp;0x8</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Memory allocation request is too big - immediate exit.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ad1dd7463c0c7a070bc249a8aed776728" class="nameRef">MPR_MEM_WARNING</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Memory use exceeds warnHeap level limit.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a4cf2a91622343c0e368ba022e64d1b87" class="nameRef">MPR_MIN_TIME_FOR_GC</a>&nbsp;&nbsp;&nbsp;2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Wait till 2 milliseconds of idle time possible.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ac17fc4ade4e707a6d59f79f513ff43a8" class="nameRef">MPR_MODULE_DATA_MANAGED</a>&nbsp;&nbsp;&nbsp;0x8</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Module.moduleData is managed.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a946249df06e7ef237168454c5c0f5041" class="nameRef">MPR_MODULE_LOADED</a>&nbsp;&nbsp;&nbsp;0x4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Dynamic module loaded.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a2ea2f3145ba5647efb9d249b64115c25" class="nameRef">MPR_MODULE_STARTED</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Module stared.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a4910df7b7926f0dfb4f89e1b49f4f0ad" class="nameRef">MPR_MODULE_STOPPED</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Module stopped.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a8ffe8c24f95b6d8cf62b935108d8681d" class="nameRef">MPR_NO_WINDOW</a>&nbsp;&nbsp;&nbsp;0x4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Don&apos;t create a windows Window.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a00253cececc72225524d098e29d552a9" class="nameRef">MPR_NORMAL_PRIORITY</a>&nbsp;&nbsp;&nbsp;50</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Normal (default) priority.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ace65c038d3a8380c6213fd2dccbc135b" class="nameRef">MPR_NOT_ALL</a>&nbsp;&nbsp;&nbsp;0x20</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Don&apos;t invoke all destructors when terminating.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1aa3a00f803c06f8d85b8281dff1021acb" class="nameRef">MPR_OBJ_HASH</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Object is a hash.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1aad59e2d06de4bfe82780a8da386d39f7" class="nameRef">MPR_OBJ_LIST</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Object is a hash.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1acd00b85221f26a15b12c07f33bfbaf75" class="nameRef">MPR_PATH_DEPTH_FIRST</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Flag for mprGetPathFiles to do a depth-first traversal.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a38348b56856049b3ea9ec95744093fdd" class="nameRef">MPR_PATH_DESCEND</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Flag for mprGetPathFiles to traverse subdirectories.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1acb217484aeb03baec071b879341cb53f" class="nameRef">MPR_PATH_INC_HIDDEN</a>&nbsp;&nbsp;&nbsp;0x4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Flag for mprGetPathFiles to include hidden files.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a905770af4f40076347a564e6ce9dcaa7" class="nameRef">MPR_PATH_NO_DIRS</a>&nbsp;&nbsp;&nbsp;0x8</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Flag for mprGetPathFiles to exclude subdirectories.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a3fb60e14b20ff11f1057e34184d8a11e" class="nameRef">MPR_PATH_RELATIVE</a>&nbsp;&nbsp;&nbsp;0x10</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Flag for mprGetPathFiles to return paths relative to the directory.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a3865b9d22e4cf35a4bbb06fe282ed0b4" class="nameRef">MPR_PROTO_ALL</a>&nbsp;&nbsp;&nbsp;0xF3</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>All protocols.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ab8b4c6493395830bdac971e9cb5a5681" class="nameRef">MPR_PROTO_SSLV2</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>SSL V2 protocol.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1af8bc5c00cc71eec98a6f90f1414860d3" class="nameRef">MPR_PROTO_SSLV3</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>SSL V3 protocol.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a20571df5bf7608fa64cffa1d357c68f1" class="nameRef">MPR_PROTO_TLSV1_0</a>&nbsp;&nbsp;&nbsp;0x10</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>TLS V1.0 protocol.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1aa66454bfc118af48a0d0df362211d9ad" class="nameRef">MPR_PROTO_TLSV1_1</a>&nbsp;&nbsp;&nbsp;0x20</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>TLS V1.1 protocol.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a7216cd86a972299f47f8f450371874c8" class="nameRef">MPR_PROTO_TLSV1_2</a>&nbsp;&nbsp;&nbsp;0x40</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>TLS V1.2 protocol.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a577cce0164e72e2e631389306bb1d0ce" class="nameRef">MPR_PROTO_TLSV1_3</a>&nbsp;&nbsp;&nbsp;0x80</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>TLS V1.3 protocol.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a92106b0b98bcd8a8d346b690564fb7d5" class="nameRef">MPR_READABLE</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Read event mask.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a6072e168871ce4b65725049d214965a1" class="nameRef">MPR_REQUEST_PRIORITY</a>&nbsp;&nbsp;&nbsp;50</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Normal priority.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1aa5fcbb86c0a6c78f2e4c0e1b9bf13e3e" class="nameRef">MPR_RFC3399_DATE</a>&nbsp;&nbsp;&nbsp;&quot;%FT%TZ&quot;</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Date format for RFC 3399 for use in HTML 5.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a2d296ae2f6a17c92630402e2e81d185b" class="nameRef">MPR_RFC_DATE</a>&nbsp;&nbsp;&nbsp;&quot;%a, %d %b %Y %T %Z&quot;</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Format a date according to RFC822: (Fri, 07 Jan 2003 12:12:21 PDT).</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a12f755dbacc1fd9a03fdcdfb3c1bbb24" class="nameRef">MPR_SERVICE_NO_BLOCK</a>&nbsp;&nbsp;&nbsp;0x4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Do not block in mprServiceEvents.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a2a21cf060065f6162ecae871533ea9f7" class="nameRef">MPR_SERVICE_NO_GC</a>&nbsp;&nbsp;&nbsp;0x8</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Don&apos;t run GC.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a9d46c2d083454a72fb5417f165fa5bb0" class="nameRef">MPR_SIGNAL_AFTER</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Flag to mprAddSignalHandler to run handler after existing handlers.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a2b9736ece464bf27b1a805211ba04774" class="nameRef">MPR_SIGNAL_BEFORE</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Flag to mprAddSignalHandler to run handler before existing handlers.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1aa26b2bbf78247ef8fd3528aabea7aa32" class="nameRef">MPR_SOCKET_BLOCK</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Use blocking I/O.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a99a15ede7932c340743a75f118ca16c6" class="nameRef">MPR_SOCKET_BROADCAST</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Broadcast mode.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ae74c5560373bf04a097187e40f4f6fe4" class="nameRef">MPR_SOCKET_BUFFERED_READ</a>&nbsp;&nbsp;&nbsp;0x800</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Socket has buffered read data (in SSL stack).</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1aea6f51f6ff2d8f1186f129c42a928fed" class="nameRef">MPR_SOCKET_BUFFERED_WRITE</a>&nbsp;&nbsp;&nbsp;0x1000</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Socket has buffered write data (in SSL stack).</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a1aad0e4c1e753954ccca3039d13b7b5a" class="nameRef">MPR_SOCKET_CERT_ERROR</a>&nbsp;&nbsp;&nbsp;0x10000</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Error when validating peer certificate.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a9899fbaf22958ef4d2fbb5bce6cbb898" class="nameRef">MPR_SOCKET_CLOSED</a>&nbsp;&nbsp;&nbsp;0x4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td><a class="ref" href="#struct_mpr_socket">MprSocket</a> has been closed.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ad5e870cae7f4f67d9d9da412128ee8f1" class="nameRef">MPR_SOCKET_CONNECTING</a>&nbsp;&nbsp;&nbsp;0x8</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td><a class="ref" href="#struct_mpr_socket">MprSocket</a> is connecting.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a3af7ac22e43b6d66754503bf4b038823" class="nameRef">MPR_SOCKET_DATAGRAM</a>&nbsp;&nbsp;&nbsp;0x10</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Use datagrams.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1afe80b08ee0c6719a2ee1a0b829345b34" class="nameRef">MPR_SOCKET_DISCONNECTED</a>&nbsp;&nbsp;&nbsp;0x4000</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The mprDisconnectSocket has been called.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a84190073ab879726ad4f3c97206fd01b" class="nameRef">MPR_SOCKET_EOF</a>&nbsp;&nbsp;&nbsp;0x20</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Seen end of file.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a9d2a8f8ca6dd4b92ed24ae8437876b50" class="nameRef">MPR_SOCKET_ERROR</a>&nbsp;&nbsp;&nbsp;0x20000</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Hard error (not just eof).</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ac7b18f9e8d350a455c880030329ce305" class="nameRef">MPR_SOCKET_GRACEFUL</a>&nbsp;&nbsp;&nbsp;1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Do a graceful shutdown.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a68d9dd23dc0f7c60e581f45eec0a729d" class="nameRef">MPR_SOCKET_HANDSHAKING</a>&nbsp;&nbsp;&nbsp;0x8000</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Doing an SSL handshake.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ac66a95e45571ae084d73dec5e4a37729" class="nameRef">MPR_SOCKET_INHERIT</a>&nbsp;&nbsp;&nbsp;0x80000</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Allow children processes to inherit.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a0dcff326be6be22f7382a95cf01fcc15" class="nameRef">MPR_SOCKET_LISTENER</a>&nbsp;&nbsp;&nbsp;0x40</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td><a class="ref" href="#struct_mpr_socket">MprSocket</a> is server listener.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a51675ba1c7573f654989a489c0803f8b" class="nameRef">MPR_SOCKET_NODELAY</a>&nbsp;&nbsp;&nbsp;0x100</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Disable Nagle algorithm.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a83a3df553a14edcbf46c671097860f20" class="nameRef">MPR_SOCKET_NOREUSE</a>&nbsp;&nbsp;&nbsp;0x80</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Don&apos;t set SO_REUSEADDR option.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ac10e11c339654be750f55d99623a46ef" class="nameRef">MPR_SOCKET_REUSE_PORT</a>&nbsp;&nbsp;&nbsp;0x40000</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Set SO_REUSEPORT option.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a46e119bbf1fc869a6aeda59f807dd1c9" class="nameRef">MPR_SOCKET_SERVER</a>&nbsp;&nbsp;&nbsp;0x400</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Socket is on the server-side.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1af3d6547888a1ecdcb880bccfc8511dd0" class="nameRef">MPR_SOCKET_THREAD</a>&nbsp;&nbsp;&nbsp;0x200</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Process callbacks on a worker thread.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ac2701801406420a29c802fc274920157" class="nameRef">MPR_STARTED</a>&nbsp;&nbsp;&nbsp;2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Applicationa and MPR services started.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1af0854041ae3023c413365e4129daaff9" class="nameRef">MPR_STOPPED</a>&nbsp;&nbsp;&nbsp;4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>App is idle and now stopped.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1add77d7932ad074fe60c0782cafc78b72" class="nameRef">MPR_STOPPING</a>&nbsp;&nbsp;&nbsp;3</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>App has been instructed to shutdown.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a1e93ff508c17a532675a9bb090d2bc7a" class="nameRef">MPR_TIMEOUT_GC_SYNC</a>&nbsp;&nbsp;&nbsp;100</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Short wait period for threads to synchronize.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a3a9a50e1c8d7de296f8d822c1ecc24d3" class="nameRef">MPR_TIMEOUT_LINGER</a>&nbsp;&nbsp;&nbsp;2000</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Close socket linger timeout.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1add8b2cf7c323c276499a6df8940f8ab1" class="nameRef">MPR_TIMEOUT_NAP</a>&nbsp;&nbsp;&nbsp;20</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Short pause.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a852ad205e9b273796bb4958700334597" class="nameRef">MPR_TIMEOUT_NO_BUSY</a>&nbsp;&nbsp;&nbsp;1000</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Wait period to minimize CPU drain.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1aa2eb3f4af9584897ff6ec601fcca4c3c" class="nameRef">MPR_TIMEOUT_PRUNER</a>&nbsp;&nbsp;&nbsp;120000</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Time between worker thread pruner runs (2 min).</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1aedd536c5e56ec128b69e540bc2926dd3" class="nameRef">MPR_TIMEOUT_START_TASK</a>&nbsp;&nbsp;&nbsp;10000</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Time to start tasks running.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a1b16c71cdee0d3ca77efef483c13ee84" class="nameRef">MPR_TIMEOUT_STOP</a>&nbsp;&nbsp;&nbsp;30000</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Default wait when stopping resources (30 sec).</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a3607582e032513bfb634178e569f6340" class="nameRef">MPR_TIMEOUT_STOP_TASK</a>&nbsp;&nbsp;&nbsp;10000</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Time to stop or reap tasks (vxworks).</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a339aae9cde8ed5cf9a21a1ac833df450" class="nameRef">MPR_TIMEOUT_WORKER</a>&nbsp;&nbsp;&nbsp;60000</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Prune worker that has been idle for 1 min.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a3b1ce37c5154b1c6a6b8f2efb15c747d" class="nameRef">MPR_TRIM_BOTH</a>&nbsp;&nbsp;&nbsp;0x3</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Flag for <a class="ref" href="#mpr_8h_1a75c783da24379c3ec2099f34d70dfd2c">strim</a> to trim from both the start and the end of the string.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1adbf6abc6c3937fa21ef3f143b7623a59" class="nameRef">MPR_TRIM_END</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Flag for <a class="ref" href="#mpr_8h_1a75c783da24379c3ec2099f34d70dfd2c">strim</a> to trim from the end of the string.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a1878ad6fa3bbc38551375afe96c54c37" class="nameRef">MPR_TRIM_START</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Flag for <a class="ref" href="#mpr_8h_1a75c783da24379c3ec2099f34d70dfd2c">strim</a> to trim from the start of the string.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a08fee871d25744a268af6b7672602b0d" class="nameRef">MPR_USER_EVENTS_THREAD</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>User will explicitly manage own mprServiceEvents calls.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ae1b2f2706fd6063db28397d25b18a18e" class="nameRef">MPR_UTC_TIMEZONE</a>&nbsp;&nbsp;&nbsp;0</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Use UTC timezone.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a12dd137a676e44d1ceed715b5343a950" class="nameRef">MPR_WAIT_IMMEDIATE</a>&nbsp;&nbsp;&nbsp;0x4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Wait handler flag to immediately service event on same thread.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a1c2ea8da2920f4756babba1ae142a952" class="nameRef">MPR_WAIT_NEW_DISPATCHER</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Wait handler flag to create a new dispatcher for each I/O event.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1af5149ad94a82e208ed753e1851e0bb10" class="nameRef">MPR_WAIT_NOT_SOCKET</a>&nbsp;&nbsp;&nbsp;0x8</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>I/O file descriptor is not a socket - windows will ignore.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a6c34a6c6e526d8151c128cfc2e984df3" class="nameRef">MPR_WAIT_RECALL_HANDLER</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Wait handler flag to recall the handler asap.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a9008127e0539e689567741f1c2b066be" class="nameRef">MPR_WORKER_BUSY</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Worker currently running to a callback.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a849aadf69f186ce445d2e68087816964" class="nameRef">MPR_WORKER_IDLE</a>&nbsp;&nbsp;&nbsp;0x4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Worker is sleeping (idle) on idleCond.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a1a46345d16dbc9d60b67e7418a2c2a09" class="nameRef">MPR_WORKER_PRIORITY</a>&nbsp;&nbsp;&nbsp;50</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Normal priority.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ad14ed6a1a6b2b467a18b80b727f2978f" class="nameRef">MPR_WORKER_PRUNED</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Worker has been pruned and will be terminated.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a1ff4bb5b07e0f1efbd40346ac4773154" class="nameRef">MPR_WRITABLE</a>&nbsp;&nbsp;&nbsp;0x4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Write event mask.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a99c147c92b721d610373d17a27328b20" class="nameRef">MPR_XML_AFTER_LS</a>&nbsp;&nbsp;&nbsp;2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Seen &quot;&lt;&quot; <br/></td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ac4c3caf4e3857f736a1b984bd2a6f32f" class="nameRef">MPR_XML_ATT_EQ</a>&nbsp;&nbsp;&nbsp;6</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Seen &quot;&lt;tag att&quot; = <br/></td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a05fdee2b677c56f79a64c44d2a4e0c06" class="nameRef">MPR_XML_ATT_NAME</a>&nbsp;&nbsp;&nbsp;5</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Seen &quot;&lt;tag att&quot; <br/></td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1aab77ddcbe5f99578ca0e9550083455f0" class="nameRef">MPR_XML_BEGIN</a>&nbsp;&nbsp;&nbsp;1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Before next tag <br/></td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a62e114580e39697e37376d12ee7af1bb" class="nameRef">MPR_XML_CDATA</a>&nbsp;&nbsp;&nbsp;13</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Seen &quot;&lt;![CDATA[&quot; U <br/></td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a90fd8a27c77c1c4748f621f25a1b499d" class="nameRef">MPR_XML_COMMENT</a>&nbsp;&nbsp;&nbsp;3</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Seen &quot;&lt;!&mdash;&quot; (usr) U <br/></td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a2790ee301de12fea5778679db28aab57" class="nameRef">MPR_XML_ELT_DATA</a>&nbsp;&nbsp;&nbsp;10</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Seen &quot;&lt;tag&gt;....&lt;&quot; U <br/></td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1abbeab1e910ce3f278f140583217df3c5" class="nameRef">MPR_XML_ELT_DEFINED</a>&nbsp;&nbsp;&nbsp;9</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Seen &quot;&lt;tag...&gt;&quot; U <br/></td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1add77391c791825c39d18317fb3151776" class="nameRef">MPR_XML_END_ELT</a>&nbsp;&nbsp;&nbsp;11</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Seen &quot;&lt;tag&gt;....&lt;/tag&gt;&quot; U <br/></td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1ac538a606669e884a98118de05ab717ea" class="nameRef">MPR_XML_EOF</a>&nbsp;&nbsp;&nbsp;-2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>End of input.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a9d47ffef429d482cf9814ea7d920e6a2" class="nameRef">MPR_XML_ERR</a>&nbsp;&nbsp;&nbsp;-1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Error.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a5de28f7380d13547e4f5f01f062049a5" class="nameRef">MPR_XML_NEW_ATT</a>&nbsp;&nbsp;&nbsp;7</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Seen &quot;&lt;tag att = &quot;val" U <br/></td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a3e307166b15e6693d8dd8e70d84b43a0" class="nameRef">MPR_XML_NEW_ELT</a>&nbsp;&nbsp;&nbsp;4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Seen &quot;&lt;tag&quot; (usr) U <br/></td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a2d20eb2c2ed2903820ebf2c08ec42d66" class="nameRef">MPR_XML_PI</a>&nbsp;&nbsp;&nbsp;12</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Seen &quot;&lt;?processingInst&quot; U <br/></td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a3967c9c48971ad228fd98b9caaccccb7" class="nameRef">MPR_XML_SOLO_ELT_DEFINED</a>&nbsp;&nbsp;&nbsp;8</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Seen &quot;&lt;tag../&gt;&quot; U <br/></td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a6db6cde3e6a3fa752613667a8e89f413" class="nameRef">MPR_YIELD_COMPLETE</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>mprYield flag to wait until the GC entirely completes including sweep phase.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a2c2a52fb0905fa3af57bc4cf56b6c294" class="nameRef">MPR_YIELD_DEFAULT</a>&nbsp;&nbsp;&nbsp;0x0</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>mprYield flag if GC is required, yield and wait for mark phase to coplete, otherwise return without blocking.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#mpr_8h_1a4a149b4f65cebcc40fe12a7361033781" class="nameRef">MPR_YIELD_STICKY</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>mprYield flag to yield and remain yielded until reset.</td></tr>
  </table>
<h2>Typedefs</h2>
<a name="mpr_8h_1ac1eae8096b0311d63a3fba54015bf1b9"></a>
<div class="api">
  <div class="prototype">
    typedef int(* MprBufProc) (struct MprBuf *bp, void *arg)
  </div>
  <div class="apiDetail">
<p>Buffer refill callback function.</p>
    <dl><dt><b>Description</b>:</dt><dd>Function to call when the buffer is depleted and needs more data.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">bp</td><td>Instance of an <a class="ref" href="#struct_mpr_buf">MprBuf</a></td></tr>
    <tr><td class="param">arg</td><td>Data argument supplied to <a class="ref" href="#mpr_8h_1a7f74f8c3d5af9db8c064b365f39cae2c">mprSetBufRefillProc</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The callback should return 0 if successful, otherwise a negative error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af96182122f42e2c56539fb35594f985c"></a>
<div class="api">
  <div class="prototype">
    typedef void(* MprCacheProc) (struct MprCache *cache, cchar *key, cchar *data, int event)
  </div>
  <div class="apiDetail">
<p>Cache item expiry callback.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cache</td><td>Cache object.</td></tr>
    <tr><td class="param">key</td><td>Cached item key.</td></tr>
    <tr><td class="param">data</td><td>Cached item data.</td></tr>
    <tr><td class="param">event</td><td>Event of interest.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aca9cf0e331925f694232cd822ed70a56"></a>
<div class="api">
  <div class="prototype">
    typedef void(* MprEventProc) (void *data, struct MprEvent *event)
  </div>
  <div class="apiDetail">
<p>Event callback function.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a1f81231ad26bae17a8bf2b2fa36ed37e"></a>
<div class="api">
  <div class="prototype">
    typedef void(* MprForkCallback) (void *arg)
  </div>
  <div class="apiDetail">
<p>Callback function before doing a fork().</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa9cd2db453ee649412b1003cfcce710c"></a>
<div class="api">
  <div class="prototype">
    typedef uint(* MprHashProc) (cvoid *name, ssize len)
  </div>
  <div class="apiDetail">
<p>Hashing function to use for the table.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">name</td><td>Name to hash.</td></tr>
    <tr><td class="param">len</td><td>Length of the name to hash.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An integer hash index.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a06e53583e17e8a5803d1bdabf523e827"></a>
<div class="api">
  <div class="prototype">
    typedef int(* MprListCompareProc) (cvoid *arg1, cvoid *arg2)
  </div>
  <div class="apiDetail">
<p>List comparison procedure for sorting.</p>
    <dl><dt><b>Description</b>:</dt><dd>Callback function signature used by <a class="ref" href="#mpr_8h_1a66e67b9938519486e9cb190582731999">mprSortList</a></dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">arg1</td><td>First list item to compare.</td></tr>
    <tr><td class="param">arg2</td><td>Second list item to compare.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Return zero if the items are equal. Return -1 if the first arg is less than the second. Otherwise return 1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a8fdb97b78014d2a084a4747a35b3235a"></a>
<div class="api">
  <div class="prototype">
    typedef void(* MprLogHandler) (cchar *tags, int level, cchar *msg)
  </div>
  <div class="apiDetail">
<p>Log handler callback type.</p>
    <dl><dt><b>Description</b>:</dt><dd>Callback prototype for the log handler. Used by mprSetLogHandler to define a message logging handler to process log and error messages. See mprLog for more details.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">tags</td><td>Source filename. Derived by using <b>FILE</b></td></tr>
    <tr><td class="param">level</td><td>Message logging level. Levels are 0-5 with five being the most verbose.</td></tr>
    <tr><td class="param">msg</td><td>Message being logged.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ad5e84d898dd29853b54cc1b49fcb4041"></a>
<div class="api">
  <div class="prototype">
    typedef void(* MprManager) (void *ptr, int flags)
  </div>
  <div class="apiDetail">
<p><a class="ref" href="#struct_mpr">Mpr</a> memory block manager prototype.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ptr</td><td>Any memory context allocated by the MPR.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac7be61c63c8a92243c67986431c48083"></a>
<div class="api">
  <div class="prototype">
    typedef void(* MprMemNotifier) (int cause, int policy, size_t size, size_t total)
  </div>
  <div class="apiDetail">
<p>Memory allocation error callback.</p>
Notifiers are called if a low memory condition exists
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cause</td><td>Set to the cause of the memory error. Set to <a class="ref" href="#mpr_8h_1ad1dd7463c0c7a070bc249a8aed776728">MPR_MEM_WARNING</a> if the allocation will exceed the warnHeap limit. Set to <a class="ref" href="#mpr_8h_1a32c694e15c93073531649ca79332bc9b">MPR_MEM_LIMIT</a> if it would exceed the maxHeap memory limit. Set to <a class="ref" href="#mpr_8h_1a80cba2f2518b3cbbfdc6537d9e4a40d9">MPR_MEM_FAIL</a> if the allocation failed. Set to <a class="ref" href="#mpr_8h_1a4fcb58aae6632033517d940deb1c3f2a">MPR_MEM_TOO_BIG</a> if the allocation block size is too large. Allocations will be rejected for MPR_MEM_FAIL and MPR_MEM_TOO_BIG, otherwise the allocations will proceed and the memory notifier will be invoked.</td></tr>
    <tr><td class="param">policy</td><td>Memory depletion policy. Set to one of <a class="ref" href="#mpr_8h_1ada97b225f9f382f841a548fe2a752fbf">MPR_ALLOC_POLICY_NOTHING</a>, <a class="ref" href="#mpr_8h_1a4986b34cbf20314d3871050732b0757f">MPR_ALLOC_POLICY_PRUNE</a>, <a class="ref" href="#mpr_8h_1ae398692bd035c07c68e2942523239154">MPR_ALLOC_POLICY_RESTART</a>, <a class="ref" href="#mpr_8h_1a078cbfd3dec0112f75123ad13efe46ef">MPR_ALLOC_POLICY_EXIT</a> or <a class="ref" href="#mpr_8h_1ab0142929f5c96aeb7f5a67a137204059">MPR_ALLOC_POLICY_ABORT</a></td></tr>
    <tr><td class="param">size</td><td>Size of the allocation that triggered the low memory condition.</td></tr>
    <tr><td class="param">total</td><td>Total memory currently in use.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac3925ae824a9d13aacc476ba20341925"></a>
<div class="api">
  <div class="prototype">
    typedef int(* MprModuleEntry) (void *data, MprModule *mp)
  </div>
  <div class="apiDetail">
<p>Loadable module entry point signature.</p>
    <dl><dt><b>Description</b>:</dt><dd>Loadable modules can have an entry point that is invoked automatically when a module is loaded.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">data</td><td>Data passed to mprCreateModule.</td></tr>
    <tr><td class="param">mp</td><td>Module object reference returned from <a class="ref" href="#mpr_8h_1a35f4f35014f5601bb37ba7bbfcac62be">mprCreateModule</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A new <a class="ref" href="#struct_mpr_module">MprModule</a> structure for the module. Return NULL if the module cannot be initialized.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a98c47ddbb625a457617163f7aeeb0edb"></a>
<div class="api">
  <div class="prototype">
    typedef int(* MprModuleProc) (struct MprModule *mp)
  </div>
  <div class="apiDetail">
<p>Module start/stop point function signature.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">mp</td><td>Module object reference returned from <a class="ref" href="#mpr_8h_1a35f4f35014f5601bb37ba7bbfcac62be">mprCreateModule</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise return a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a87e9f435008723c7b1489af1944c6e20"></a>
<div class="api">
  <div class="prototype">
    typedef Offset MprOff
  </div>
  <div class="apiDetail">
<p>Signed file offset data type.</p>
Supports large files greater than 4GB in size on all systems
  </div>
</div>
<a name="mpr_8h_1ac4a10702a0dc44988261064f0ec18dd8"></a>
<div class="api">
  <div class="prototype">
    typedef void(* MprSignalProc) (void *arg, struct MprSignal *sp)
  </div>
  <div class="apiDetail">
<p>Signal callback procedure.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a3105b7eaf43b2c002e520aa4a870fdee"></a>
<div class="api">
  <div class="prototype">
    typedef int(* MprSocketPrebind) (struct MprSocket *sock)
  </div>
  <div class="apiDetail">
<p>Callback before binding a socket.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac7bad8a3b219b43b6b3be36c7ff25d2c"></a>
<div class="api">
  <div class="prototype">
    typedef int(* MprSocketProc) (void *data, int mask)
  </div>
  <div class="apiDetail">
<p>Socket I/O callback procedure.</p>
Proc returns non-zero if the socket has been deleted
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a69516d3096bf8d921a5348af8ce7ebde"></a>
<div class="api">
  <div class="prototype">
    typedef int(* MprSortProc) (cvoid *p1, cvoid *p2, void *ctx)
  </div>
  <div class="apiDetail">
<p>Quicksort callback function.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is a quicksort callback with a context argument.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">p1</td><td>Pointer to first element.</td></tr>
    <tr><td class="param">p2</td><td>Pointer to second element.</td></tr>
    <tr><td class="param">ctx</td><td>Context argument to provide to comparison function.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>-1, 0, or 1, depending on if the elements are p1 &lt; p2, p1 == p2 or p1 &gt; p2.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a4b92b1380a1bcb694131c104e1062c4f"></a>
<div class="api">
  <div class="prototype">
    typedef void(* MprTerminator) (int state, int exitStrategy, int status)
  </div>
  <div class="apiDetail">
<p>Service shutdown notifier.</p>
    <dl><dt><b>Description</b>:</dt><dd>Services may create shutdown notifiers, called terminators that are informed when the application commences a shutdown. The terminator may be invoked several times and the service should take appropriate action based on given the MPR state. <br/><br/>
 If the state parameter is set to MPR_STOPPING, the service should not accept any new requests, but otherwise not take any destructive actions. Note this state is required to be reversible if the shutdown is cancelled. <br/><br/>
 If the state is MPR_STOPPED, the service should cancel all running requests, close files and connections and release all resources. This state is not reversible. <br/><br/>
 This exitStrategy parameter is a flags word that defines the shutdown strategy. See <a class="ref" href="#mpr_8h_1a2836549ee05ea1901a64a26e51f8ed86">mprShutdown</a> for details.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">state</td><td>Current MPR state. Set to <a class="ref" href="#mpr_8h_1ac2701801406420a29c802fc274920157">MPR_STARTED</a>, <a class="ref" href="#mpr_8h_1add77d7932ad074fe60c0782cafc78b72">MPR_STOPPING</a>, <a class="ref" href="#mpr_8h_1af0854041ae3023c413365e4129daaff9">MPR_STOPPED</a> and <a class="ref" href="#mpr_8h_1a841f0e6572685f21ee34a805e18d2c7d">MPR_DESTROYED</a></td></tr>
    <tr><td class="param">exitStrategy</td><td>Flags word including the flags: MPR_EXIT_ABORT, MPR_EXIT_RESTART and MPR_EXIT_SAFE.</td></tr>
    <tr><td class="param">status</td><td>The desired application exit status.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a48c1189e15feb2e337536ab8f562284a"></a>
<div class="api">
  <div class="prototype">
    typedef void(* MprThreadProc) (void *arg, struct MprThread *tp)
  </div>
  <div class="apiDetail">
<p>Thread main procedure.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">arg</td><td>Argument to the thread main.</td></tr>
    <tr><td class="param">tp</td><td>Thread instance reference.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1adbceeccda24c35e7b4c6090db7065319"></a>
<div class="api">
  <div class="prototype">
    typedef Ticks MprTicks
  </div>
  <div class="apiDetail">
<p>Elapsed time data type.</p>
Stores time in milliseconds from some arbitrary start epoch
  </div>
</div>
<a name="mpr_8h_1a094e0c6234adac79949a031e8f24690c"></a>
<div class="api">
  <div class="prototype">
    typedef Time MprTime
  </div>
  <div class="apiDetail">
<p>Date and Time Service.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#mpr_8h_1a087ffc47d75b5f88dbfcabb8c3cd2d21" class="ref">mprCompareTime</a>, <a href="#mpr_8h_1a7470862a8c3db1e0ffcd83ad12a512be" class="ref">mprCreateTimeService</a>, <a href="#mpr_8h_1a1e078d6a9ff6fca1fc5cf3653264aa57" class="ref">mprDecodeLocalTime</a>, <a href="#mpr_8h_1ad52cfde22b75a620147b661f796ba8dc" class="ref">mprDecodeUniversalTime</a>, <a href="#mpr_8h_1a00f1d24d71418a0abafc2ff104f23609" class="ref">mprFormatLocalTime</a>, <a href="#mpr_8h_1a4480b487cb113986815b59c1b4d5b2cf" class="ref">mprFormatTm</a>, <a href="#mpr_8h_1a07a8f789f0873dff5de3a4e3e51b7956" class="ref">mprGetDate</a>, <a href="#mpr_8h_1a1f88b37382ba7d2e48289415df0383ea" class="ref">mprGetElapsedTicks</a>, <a href="#mpr_8h_1a593854e3645e9587bca0daf66bccddf4" class="ref">mprGetHiResTicks</a>, <a href="#mpr_8h_1a431da15c3ff9707b89a7097a85bd90de" class="ref">mprGetRemainingTicks</a>, <a href="#mpr_8h_1ac592bf4081e72d463277963567db5aa4" class="ref">mprGetTimeZoneOffset</a></dd></dl>
  </div>
</div>
<a name="mpr_8h_1a6c2bc16deb84f2893c1935deb94bec29"></a>
<div class="api">
  <div class="prototype">
    typedef void(* MprWorkerProc) (void *data, struct MprWorker *worker)
  </div>
  <div class="apiDetail">
<p>Worker thread callback signature.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">data</td><td>worker callback data. Set via mprStartWorker or mprActivateWorker.</td></tr>
    <tr><td class="param">worker</td><td>Reference to the worker thread object.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa49d1c32fc1e641828bf8ffbcf675be6"></a>
<div class="api">
  <div class="prototype">
    typedef int(* MprXmlHandler) (struct MprXml *xp, int state, cchar *tagName, cchar *attName, cchar *value)
  </div>
  <div class="apiDetail">
<p>XML callback handler.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">xp</td><td>XML instance reference.</td></tr>
    <tr><td class="param">state</td><td>XML state.</td></tr>
    <tr><td class="param">tagName</td><td>Current XML tag.</td></tr>
    <tr><td class="param">attName</td><td>Current XML attribute.</td></tr>
    <tr><td class="param">value</td><td>Current XML element value.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ad7d3735f6e2ef85b57904b5cce3832a4"></a>
<div class="api">
  <div class="prototype">
    typedef ssize(* MprXmlInputStream) (struct MprXml *xp, void *arg, char *buf, ssize size)
  </div>
  <div class="apiDetail">
<p>XML input stream function.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">xp</td><td>XML instance reference.</td></tr>
    <tr><td class="param">arg</td><td>to input stream.</td></tr>
    <tr><td class="param">buf</td><td>Buffer into which to read data.</td></tr>
    <tr><td class="param">size</td><td>Size of buf.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a1600235df88b3821764244933b5024f5"></a>
<div class="api">
  <div class="prototype">
    typedef long size_t
  </div>
  <div class="apiDetail">
<p>Unsigned integral type.</p>
Equivalent in size to void*
  </div>
</div>
<a name="mpr_8h_1af9381320a2640ea84038579d8f143c01"></a>
<div class="api">
  <div class="prototype">
    typedef int Socket
  </div>
  <div class="apiDetail">
<p>Argument for sockets.</p>
  </div>
</div>
<a name="struct_mpr"></a>
<div class="api">
  <div class="prototype">Mpr</div>
  <div class="apiDetail">
<p>Primary MPR application control structure.</p>
    <dl><dt><b>Description</b>:</dt><dd>The <a class="ref" href="#struct_mpr">Mpr</a> structure stores critical application state information.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">cchar *</td><td>appDir</td><td>
Path of directory containing app executable.
</td></tr>
<tr><td class="param">cchar *</td><td>appPath</td><td>
Path name of application executable.
</td></tr>
<tr><td class="param">void *</td><td>appwebService</td><td>
Appweb service object.
</td></tr>
<tr><td class="param">char **</td><td>argBuf</td><td>
Space for allocated argv.
</td></tr>
<tr><td class="param">int</td><td>argc</td><td>
Count of command line args.
</td></tr>
<tr><td class="param">cchar **</td><td>argv</td><td>
Application command line args (not alloced).
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_cmd_service">MprCmdService</a> *</td><td>cmdService</td><td>
Command service object.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_cond">MprCond</a> *</td><td>cond</td><td>
Sync after starting events thread.
</td></tr>
<tr><td class="param">bool</td><td>debugMode</td><td>
Run in debug mode (no timers).
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_dispatcher">MprDispatcher</a> *</td><td>dispatcher</td><td>
Primary dispatcher.
</td></tr>
<tr><td class="param">char *</td><td>domainName</td><td>
Domain portion.
</td></tr>
<tr><td class="param">void *</td><td>ediService</td><td>
EDI object.
</td></tr>
<tr><td class="param">void *</td><td>ejsService</td><td>
Ejscript service.
</td></tr>
<tr><td class="param">char *</td><td>emptyString</td><td>
&quot;&quot; string.
</td></tr>
<tr><td class="param">void *</td><td>espService</td><td>
ESP service object.
</td></tr>
<tr><td class="param">int</td><td>eventing</td><td>
Servicing events thread is active.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_event_service">MprEventService</a> *</td><td>eventService</td><td>
Event service object.
</td></tr>
<tr><td class="param">int</td><td>exitStrategy</td><td>
How to exit the app.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319">MprTicks</a></td><td>exitTimeout</td><td>
Request timeout when exiting.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_list">MprList</a> *</td><td>fileSystems</td><td>
File system objects.
</td></tr>
<tr><td class="param">int</td><td>flags</td><td>
Misc flags.
</td></tr>
<tr><td class="param">int</td><td>hasError</td><td>
<a class="ref" href="#struct_mpr">Mpr</a> has an initialization error.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_heap">MprHeap</a> *</td><td>heap</td><td>
Memory heap control.
</td></tr>
<tr><td class="param">char *</td><td>hostName</td><td>
Host name (fully qualified name).
</td></tr>
<tr><td class="param">void *</td><td>httpService</td><td>
Http service object.
</td></tr>
<tr><td class="param">MprIdleCallback</td><td>idleCallback</td><td>
Invoked to determine if the process is idle.
</td></tr>
<tr><td class="param">char *</td><td>ip</td><td>
Public IP Address.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_hash">MprHash</a> *</td><td>keys</td><td>
Simple key/value store.
</td></tr>
<tr><td class="param">int</td><td>logBackup</td><td>
Number of log files preserved when backing up.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_file">MprFile</a> *</td><td>logFile</td><td>
Log file.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1a8fdb97b78014d2a084a4747a35b3235a">MprLogHandler</a></td><td>logHandler</td><td>
Current log handler callback.
</td></tr>
<tr><td class="param">int</td><td>logLevel</td><td>
Log trace level.
</td></tr>
<tr><td class="param">cchar *</td><td>logPath</td><td>
Log path name.
</td></tr>
<tr><td class="param">ssize</td><td>logSize</td><td>
Maximum log size.
</td></tr>
<tr><td class="param">MprOsThread</td><td>mainOsThread</td><td>
Main OS thread ID.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_hash">MprHash</a> *</td><td>mimeTypes</td><td>
Table of mime types.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_module_service">MprModuleService</a> *</td><td>moduleService</td><td>
Module service object.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_mutex">MprMutex</a> *</td><td>mutex</td><td>
Thread synchronization used for global lock.
</td></tr>
<tr><td class="param">char *</td><td>name</td><td>
Product name.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_dispatcher">MprDispatcher</a> *</td><td>nonBlock</td><td>
Nonblocking dispatcher.
</td></tr>
<tr><td class="param">char *</td><td>oneString</td><td>
&quot;1&quot; string.
</td></tr>
<tr><td class="param">struct MprOsService *</td><td>osService</td><td>
O/S service object.
</td></tr>
<tr><td class="param">char *</td><td>pathEnv</td><td>
Cached PATH env var. 
Used by <a class="ref" href="#struct_mpr_cmd">MprCmd</a>
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_file_system">MprFileSystem</a> *</td><td>romfs</td><td>
Rom file system object.
</td></tr>
<tr><td class="param">char *</td><td>serverName</td><td>
Server name portion (no domain).
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319">MprTicks</a></td><td>shutdownStarted</td><td>
When the shutdown started.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_signal_service">MprSignalService</a> *</td><td>signalService</td><td>
Signal service object.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_socket_service">MprSocketService</a> *</td><td>socketService</td><td>
Socket service object.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_spin">MprSpin</a> *</td><td>spin</td><td>
Quick thread synchronization.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c">MprTime</a></td><td>start</td><td>
When the MPR started.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_file">MprFile</a> *</td><td>stdError</td><td>
Standard error file.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_file">MprFile</a> *</td><td>stdInput</td><td>
Standard input file.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_file">MprFile</a> *</td><td>stdOutput</td><td>
Standard output file.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_cond">MprCond</a> *</td><td>stopCond</td><td>
Sync for stopping.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_list">MprList</a> *</td><td>terminators</td><td>
Termination callbacks.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_thread_service">MprThreadService</a> *</td><td>threadService</td><td>
Thread service object.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_hash">MprHash</a> *</td><td>timeTokens</td><td>
Date/Time parsing tokens.
</td></tr>
<tr><td class="param">char *</td><td>title</td><td>
Product title.
</td></tr>
<tr><td class="param">int</td><td>verifySsl</td><td>
Default verification of SSL certificates.
</td></tr>
<tr><td class="param">char *</td><td>version</td><td>
Product version.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_wait_service">MprWaitService</a> *</td><td>waitService</td><td>
IO Waiting service object.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_worker_service">MprWorkerService</a> *</td><td>workerService</td><td>
Worker service object.
</td></tr>
    </table></dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#mpr_8h_1a34490595fe86683f06e8d6e9abc72aa3" class="ref">mprAddTerminator</a>, <a href="#mpr_8h_1a4a53a1cb08f0054bea68b74855d555fd" class="ref">mprBreakpoint</a>, <a href="#mpr_8h_1a000f7f94708664e292b1bddeb69a7996" class="ref">mprCreate</a>, <a href="#mpr_8h_1af3272904f3223b0a7e90967c5d7fd3cd" class="ref">mprCreateOsService</a>, <a href="#mpr_8h_1a0baa25ccc4220f5a64804cfc50c4b394" class="ref">mprDecode64</a>, <a href="#mpr_8h_1a4f36e049582f33f7384fd5648db77a2a" class="ref">mprDestroy</a>, <a href="#mpr_8h_1abe3cfb3803a928b435c9af5d46b61fb0" class="ref">mprEmptyString</a>, <a href="#mpr_8h_1a0800d67d2b12aff346dfae654edb23a9" class="ref">mprEncode64</a>, <a href="#mpr_8h_1a9ea6502e39da67e59f1f11f808ec02b3" class="ref">mprEscapeCmd</a>, <a href="#mpr_8h_1a7d3003f3b50a50276f8643e51860e5c3" class="ref">mprGetAppDir</a>, <a href="#mpr_8h_1ad74c6620549f5cc262ab0e19f7b89e06" class="ref">mprGetAppName</a>, <a href="#mpr_8h_1a1a448850bac399919424976a69e0ac87" class="ref">mprGetAppPath</a>, <a href="#mpr_8h_1a18dfbba3def279be7d964caf6406aa28" class="ref">mprGetAppTitle</a>, <a href="#mpr_8h_1ac8a0abeb29a70859022071c5d1d9625a" class="ref">mprGetAppVersion</a>, <a href="#mpr_8h_1a06742ab6e80eb33573632ca502ae2c16" class="ref">mprGetCmdlineLogging</a>, <a href="#mpr_8h_1aad943db137f5906883e08af68d3436b8" class="ref">mprGetDebugMode</a>, <a href="#mpr_8h_1af885fc9c79401476c95bfdb53996efdd" class="ref">mprGetDomainName</a>, <a href="#mpr_8h_1adb6c109b9a562ddbba0fcc9acb15c862" class="ref">mprGetEndian</a>, <a href="#mpr_8h_1aeecae95080f23d6052020b6f16ec7b92" class="ref">mprGetError</a>, <a href="#mpr_8h_1a846bf5ed140accc0a52f33919a32e0da" class="ref">mprGetHostName</a>, <a href="#mpr_8h_1a3657b2c77af0992419809b0d97aa05db" class="ref">mprGetIpAddr</a>, <a href="#mpr_8h_1a4cfc9b704aa9db3e8f46e07a6eb7119a" class="ref">mprGetLogLevel</a>, <a href="#mpr_8h_1a8962a0650385fc6a6efcc8b1d606fe47" class="ref">mprGetMD5</a>, <a href="#mpr_8h_1a5c59cd24665cae7c85b0578f2fb6b94a" class="ref">mprGetMD5WithPrefix</a>, <a href="#mpr_8h_1a675f57002f372b9c35eba6694b0a1ee8" class="ref">mprGetOsError</a>, <a href="#mpr_8h_1a69984bba38604d0bbc89c6b57ee18bef" class="ref">mprGetRandomBytes</a>, <a href="#mpr_8h_1a55a456488470dd6941f602ddc3ef6be7" class="ref">mprGetServerName</a>, <a href="#mpr_8h_1affaa2a3bb2f99575faf2f5d3204b2d8d" class="ref">mprIsDestroyed</a>, <a href="#mpr_8h_1a752248cc6a0c0933c657ebdf505402be" class="ref">mprIsDestroying</a>, <a href="#mpr_8h_1aa07c03ff5f586d99e46ad8bc7b519eba" class="ref">mprIsIdle</a>, <a href="#mpr_8h_1a7e84dffeb346754ceff2fff74da87bc6" class="ref">mprIsStopping</a>, <a href="#mpr_8h_1a02a389f1cd2f5a8ba4e5d2417ae87276" class="ref">mprMakeArgv</a>, <a href="#mpr_8h_1adb3d1376089ffada27656c3a69cdf74f" class="ref">mprRandom</a>, <a href="#mpr_8h_1acce9cdb4178a693af784d4b37a862665" class="ref">mprRestart</a>, <a href="#mpr_8h_1a8f997de03358e990de88e7e952b48641" class="ref">mprServicesAreIdle</a>, <a href="#mpr_8h_1ad48220b7862b645de3920d74aa9b011e" class="ref">mprSetAppName</a>, <a href="#mpr_8h_1acb25fd80b4d560d2c347ae8a692de0f1" class="ref">mprSetDebugMode</a>, <a href="#mpr_8h_1a9dbc9553237fd2af50c9cf7e19f3045a" class="ref">mprSetDomainName</a>, <a href="#mpr_8h_1af61307049c58bbb253244babc9d5a6b1" class="ref">mprSetHostName</a>, <a href="#mpr_8h_1a829517ad9c44a5a377f3d70928c6d9c2" class="ref">mprSetIdleCallback</a>, <a href="#mpr_8h_1a1fa92eb8cb9bf4f023f4f60f57001abc" class="ref">mprSetIpAddr</a>, <a href="#mpr_8h_1a5072dbfb7278b3247096146ead8b7162" class="ref">mprSetLogLevel</a>, <a href="#mpr_8h_1a4def6498567ad43a6da505d43bb119fc" class="ref">mprSetServerName</a>, <a href="#mpr_8h_1ac79cdd0486a5ee8a6db3e93096f15ee9" class="ref">mprShouldAbortRequests</a>, <a href="#mpr_8h_1a8b6c8348517bf8cb56468cb8106d7147" class="ref">mprShouldDenyNewRequests</a>, <a href="#mpr_8h_1a2836549ee05ea1901a64a26e51f8ed86" class="ref">mprShutdown</a>, <a href="#mpr_8h_1a85c39ea54c27d4b13825ba78c2e7adda" class="ref">mprSleep</a>, <a href="#mpr_8h_1a57dfaf371ac0d16f5a09dc6595316692" class="ref">mprStart</a>, <a href="#mpr_8h_1add5858bb2b86157b6d37aef892696241" class="ref">mprStartEventsThread</a>, <a href="#mpr_8h_1aea150df805ae67bea5f09b095544f14c" class="ref">mprStartOsService</a>, <a href="#mpr_8h_1a1fa973743b8b7ab3132f6326d47e2caf" class="ref">mprStopOsService</a>, <a href="#mpr_8h_1af03b7222f372da3367027b0f92f3e83f" class="ref">mprUriDecode</a>, <a href="#mpr_8h_1a075b8404f829cbbd86365ba837445ad9" class="ref">mprUriEncode</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="struct_mpr_buf"></a>
<div class="api">
  <div class="prototype">MprBuf</div>
  <div class="apiDetail">
<p>Dynamic Buffer Module.</p>
    <dl><dt><b>Description</b>:</dt><dd><a class="ref" href="#struct_mpr_buf">MprBuf</a> is a flexible, dynamic growable buffer structure. It has start and end pointers to the data buffer which act as read/write pointers. Routines are provided to get and put data into and out of the buffer and automatically advance the appropriate start/end pointer. By definition, the buffer is empty when the start pointer == the end pointer. Buffers can be created with a fixed size or can grow dynamically as more data is added to the buffer. <br/><br/>
For performance, the specification of <a class="ref" href="#struct_mpr_buf">MprBuf</a> is deliberately exposed. All members of <a class="ref" href="#struct_mpr_buf">MprBuf</a> are implicitly public. However, it is still recommended that wherever possible, you use the accessor routines provided.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">ssize</td><td>buflen</td><td>
Current size of buffer.
</td></tr>
<tr><td class="param">char *</td><td>data</td><td>
Actual buffer for data.
</td></tr>
<tr><td class="param">char *</td><td>end</td><td>
Pointer one past the last data chr.
</td></tr>
<tr><td class="param">char *</td><td>endbuf</td><td>
Pointer one past the end of buffer.
</td></tr>
<tr><td class="param">ssize</td><td>growBy</td><td>
Next growth increment to use.
</td></tr>
<tr><td class="param">ssize</td><td>maxsize</td><td>
Max size the buffer can ever grow.
</td></tr>
<tr><td class="param">void *</td><td>refillArg</td><td>
Refill arg - must be alloced memory.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1ac1eae8096b0311d63a3fba54015bf1b9">MprBufProc</a></td><td>refillProc</td><td>
Auto-refill procedure.
</td></tr>
<tr><td class="param">char *</td><td>start</td><td>
Pointer to next data char.
</td></tr>
    </table></dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#mpr_8h_1ac1eae8096b0311d63a3fba54015bf1b9" class="ref">MprBufProc</a>, <a href="#mpr_8h_1a159c096de4aec192e25b275f1f5e031d" class="ref">mprAddNullToBuf</a>, <a href="#mpr_8h_1a95de494427536885cd80187593d45d91" class="ref">mprAdjustBufEnd</a>, <a href="#mpr_8h_1a52128fe8a192cd1cf4541cccf6ce3625" class="ref">mprAdjustBufStart</a>, <a href="#mpr_8h_1a2dd6f8d47006829959a15ce9af142448" class="ref">mprBufToString</a>, <a href="#mpr_8h_1a89bacfb9bbb1c8129e41210a7f878f13" class="ref">mprCloneBuf</a>, <a href="#mpr_8h_1aab2501188e2f3f59008f8f27e14732e9" class="ref">mprCompactBuf</a>, <a href="#mpr_8h_1a9de0736b6967e4569192d230f16b8d71" class="ref">mprCreateBuf</a>, <a href="#mpr_8h_1a453b62a6659fc9fa4d041165dad7461e" class="ref">mprFlushBuf</a>, <a href="#mpr_8h_1a142b9eecd08dac10c50cd705045ddb80" class="ref">mprGetBlockFromBuf</a>, <a href="#mpr_8h_1a2791daeb72ae2e3f455250dfba72aa67" class="ref">mprGetBufRefillProc</a>, <a href="#mpr_8h_1af128b71005bdd12507110e1f21b483d4" class="ref">mprGetCharFromBuf</a>, <a href="#mpr_8h_1a00b4c52b236de298af2ac5047bab6e57" class="ref">mprGrowBuf</a>, <a href="#mpr_8h_1a6f91b177cd36508c9d470636b04fa7b5" class="ref">mprInsertCharToBuf</a>, <a href="#mpr_8h_1a9ae5abc2e8c8b3359ca450e505564359" class="ref">mprLookAtLastCharInBuf</a>, <a href="#mpr_8h_1abe01ab970d735db5a92cea5f9456de5e" class="ref">mprLookAtNextCharInBuf</a>, <a href="#mpr_8h_1aa88196b86b9c9544f97e5910b015380d" class="ref">mprPutBlockToBuf</a>, <a href="#mpr_8h_1a5ab66b5d96db8b33e3bb0c3bbb9c90e2" class="ref">mprPutCharToBuf</a>, <a href="#mpr_8h_1ad98ea666348e1e1ed066b19b6f4825bb" class="ref">mprPutIntToBuf</a>, <a href="#mpr_8h_1ae3886d4e6180a460bc74a80047a54c70" class="ref">mprPutPadToBuf</a>, <a href="#mpr_8h_1a50d08cdfc9c21e71af90586104a5839e" class="ref">mprPutStringToBuf</a>, <a href="#mpr_8h_1a394fa1a51d7f2dcc4be222f51ea5a25b" class="ref">mprPutSubStringToBuf</a>, <a href="#mpr_8h_1adedfafbf8dca819c37cdbc41592b4823" class="ref">mprPutToBuf</a>, <a href="#mpr_8h_1a9e7451ec61507706a06c6c8149bebc52" class="ref">mprRefillBuf</a>, <a href="#mpr_8h_1ae6f9d70c3aab3eb2d9235a1c2a8f63a8" class="ref">mprResetBufIfEmpty</a>, <a href="#mpr_8h_1affa4e80d4cc95a6816bfe84767d11e2f" class="ref">mprSetBufMax</a>, <a href="#mpr_8h_1a7f74f8c3d5af9db8c064b365f39cae2c" class="ref">mprSetBufRefillProc</a>, <a href="#mpr_8h_1ab72f5c9cc154767c1b299f665237d6a6" class="ref">mprSetBufSize</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="struct_mpr_cache"></a>
<div class="api">
  <div class="prototype">MprCache</div>
  <div class="apiDetail">
<p>In-memory caching.</p>
    <dl><dt>See Also:</dt><dd>
    <a href="#mpr_8h_1a723be1009e7b9cd130cc53f2f3545e94" class="ref">mprCreateCache</a>, <a href="#mpr_8h_1a9d65a430a441e5ea99ac123c64e6d750" class="ref">mprDestroyCache</a>, <a href="#mpr_8h_1a217793852b371ff5520edc80bc64358c" class="ref">mprIncCache</a>, <a href="#mpr_8h_1a9a5e2d48f59b4d7c88ec76cc311b0c70" class="ref">mprReadCache</a>, <a href="#mpr_8h_1a6585b0b574a517d4149b4f651973d95d" class="ref">mprRemoveCache</a>, <a href="#mpr_8h_1ac79a433b92c0e81df3b282345eef07ad" class="ref">mprSetCacheLimits</a>, <a href="#mpr_8h_1ad85cef853dbc0a16f343e7c720708ce8" class="ref">mprWriteCache</a></dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param"><a class="ref" href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319">MprTicks</a></td><td>lifespan</td><td>
Default lifespan (msec).
</td></tr>
<tr><td class="param">ssize</td><td>maxKeys</td><td>
Max number of keys.
</td></tr>
<tr><td class="param">ssize</td><td>maxMem</td><td>
Max memory for session data.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_mutex">MprMutex</a> *</td><td>mutex</td><td>
Cache lock.
</td></tr>
<tr><td class="param">int</td><td>resolution</td><td>
Frequence for pruner.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_cache">MprCache</a> *</td><td>shared</td><td>
Shared common cache.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_hash">MprHash</a> *</td><td>store</td><td>
Key/value store.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_event">MprEvent</a> *</td><td>timer</td><td>
Pruning timer.
</td></tr>
<tr><td class="param">ssize</td><td>usedMem</td><td>
Memory in use for keys and data.
</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="struct_mpr_cmd"></a>
<div class="api">
  <div class="prototype">MprCmd</div>
  <div class="apiDetail">
<p>Command execution Service.</p>
    <dl><dt><b>Description</b>:</dt><dd>The <a class="ref" href="#struct_mpr_cmd">MprCmd</a> service enables execution of local commands. It uses three full-duplex pipes to communicate read, write and error data with the command.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">int</td><td>argc</td><td>
Count of args in argv.
</td></tr>
<tr><td class="param">cchar **</td><td>argv</td><td>
List of args. 
Null terminated.
</td></tr>
<tr><td class="param">MprCmdProc</td><td>callback</td><td>
Handler for client output and completion.
</td></tr>
<tr><td class="param">void *</td><td>callbackData</td><td>
Managed callback data reference.
</td></tr>
<tr><td class="param">bool</td><td>complete</td><td>
All channels EOF and status gathered.
</td></tr>
<tr><td class="param">cchar **</td><td>defaultEnv</td><td>
Environment to use if no env passed to mprStartCmd.
</td></tr>
<tr><td class="param">char *</td><td>dir</td><td>
Current working dir for the process.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_dispatcher">MprDispatcher</a> *</td><td>dispatcher</td><td>
Dispatcher to use for wait events.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_list">MprList</a> *</td><td>env</td><td>
List of environment variables. 
Null terminated.
</td></tr>
<tr><td class="param">int</td><td>eofCount</td><td>
Count of end-of-files.
</td></tr>
<tr><td class="param">MprCmdFile</td><td>files[MPR_CMD_MAX_PIPE]</td><td>
Stdin, stdout for the command.
</td></tr>
<tr><td class="param">int</td><td>flags</td><td>
Control flags (userFlags not here).
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1a1f81231ad26bae17a8bf2b2fa36ed37e">MprForkCallback</a></td><td>forkCallback</td><td>
Forked client callback.
</td></tr>
<tr><td class="param">void *</td><td>forkData</td><td>
Managed fork callback data reference.
</td></tr>
<tr><td class="param">cchar **</td><td>makeArgv</td><td>
Allocated argv.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_mutex">MprMutex</a> *</td><td>mutex</td><td>
Multithread sync.
</td></tr>
<tr><td class="param">int</td><td>originalPid</td><td>
Persistent copy of the pid.
</td></tr>
<tr><td class="param">int</td><td>pid</td><td>
Process ID of the created process.
</td></tr>
<tr><td class="param">cchar *</td><td>program</td><td>
Program path name.
</td></tr>
<tr><td class="param">int</td><td>requiredEof</td><td>
Number of EOFs required for an exit.
</td></tr>
<tr><td class="param">char *</td><td>searchPath</td><td>
Search path to use to locate the command.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_signal">MprSignal</a> *</td><td>signal</td><td>
Signal handler for SIGCHLD.
</td></tr>
<tr><td class="param">int</td><td>status</td><td>
Command exit status.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_buf">MprBuf</a> *</td><td>stderrBuf</td><td>
Standard error output from the client.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_buf">MprBuf</a> *</td><td>stdoutBuf</td><td>
Standard output from the client.
</td></tr>
<tr><td class="param">bool</td><td>stopped</td><td>
Command stopped.
</td></tr>
<tr><td class="param">int</td><td>timedout</td><td>
Request has timedout.
</td></tr>
<tr><td class="param">void *</td><td>userData</td><td>
User data storage.
</td></tr>
<tr><td class="param">int</td><td>userFlags</td><td>
User flags storage.
</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#mpr_8h_1ac48a59b1bfc4f3944a88e152863c3d32" class="ref">mprCloseCmdFd</a>, <a href="#mpr_8h_1a707b8f9bc8cf13f3a4d9c463f93b5487" class="ref">mprCreateCmd</a>, <a href="#mpr_8h_1aa6cedd25447b88aa144bc50fdcec6951" class="ref">mprDestroyCmd</a>, <a href="#mpr_8h_1a66cccaaaa550e9d2cf381ff8854c2d7a" class="ref">mprDisableCmdEvents</a>, <a href="#mpr_8h_1a7562126cafba57260cd73634f1ee4aed" class="ref">mprDisconnectCmd</a>, <a href="#mpr_8h_1a2fd38e2aaf8e7c2a1aed39aa1005155e" class="ref">mprEnableCmdEvents</a>, <a href="#mpr_8h_1ac28276b68838d380698c4995fc9b1267" class="ref">mprFinalizeCmd</a>, <a href="#mpr_8h_1ae85d70142c3176988a699d77d0d7db30" class="ref">mprGetCmdBuf</a>, <a href="#mpr_8h_1af75f9ee1ad6ce783f18263761fde73c3" class="ref">mprGetCmdExitStatus</a>, <a href="#mpr_8h_1ab286ce3b057579a16b84ec56997ae63f" class="ref">mprGetCmdFd</a>, <a href="#mpr_8h_1a265a266b3c9f354009c225c9a2f1c75d" class="ref">mprIsCmdComplete</a>, <a href="#mpr_8h_1a5ac545e5959e115b2cd633004f5d949b" class="ref">mprIsCmdRunning</a>, <a href="#mpr_8h_1a00910d0636480e6960ebbf46d58b5a2e" class="ref">mprReadCmd</a>, <a href="#mpr_8h_1aae5bd75d3750777971cfad687c0f9f15" class="ref">mprReapCmd</a>, <a href="#mpr_8h_1aea3178396a249792e696eb04ee9df3ba" class="ref">mprRunCmd</a>, <a href="#mpr_8h_1a40c6d3c5980dd3db76189fa6ee38874a" class="ref">mprRunCmdV</a>, <a href="#mpr_8h_1a8288e08dc7387c14e0536d214eba6049" class="ref">mprSetCmdCallback</a>, <a href="#mpr_8h_1aa0e753a2136410b79e480713aaf97b89" class="ref">mprSetCmdDir</a>, <a href="#mpr_8h_1a731bf3b3b53862f42249d5a771107363" class="ref">mprSetCmdEnv</a>, <a href="#mpr_8h_1a8810126341868790cc02a34e4a0833ec" class="ref">mprSetCmdSearchPath</a>, <a href="#mpr_8h_1a120e7a3a3a571b9520853e31d9ce6021" class="ref">mprStartCmd</a>, <a href="#mpr_8h_1a6a027763dead49cc62961a6e6b17c501" class="ref">mprStopCmd</a>, <a href="#mpr_8h_1a1e3fc2a672d14270f5a15f08b9a99409" class="ref">mprWaitForCmd</a>, <a href="#mpr_8h_1aa3c9a3297a496bc567acf3c09e71596e" class="ref">mprWriteCmd</a>, <a href="#mpr_8h_1ac355af7d14d5b35fbcbf21e067b0104e" class="ref">mprWriteCmdBlock</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="struct_mpr_cmd_service"></a>
<div class="api">
  <div class="prototype">MprCmdService</div>
  <div class="apiDetail">
<p>Command execution service.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
    </table></dd></dl>
  </div>
</div>
<a name="struct_mpr_cond"></a>
<div class="api">
  <div class="prototype">MprCond</div>
  <div class="apiDetail">
<p>Condition variable for single and multi-thread synchronization.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">pthread_cond_t</td><td>cv</td><td>
Unix pthreads condition variable.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_mutex">MprMutex</a> *</td><td>mutex</td><td>
Thread synchronization mutex.
</td></tr>
<tr><td class="param">volatile int</td><td>triggered</td><td>
Value of the condition.
</td></tr>
    </table></dd></dl>
  </div>
</div>
<a name="struct_mpr_dir_entry"></a>
<div class="api">
  <div class="prototype">MprDirEntry</div>
  <div class="apiDetail">
<p>Directory entry description.</p>
    <dl><dt><b>Description</b>:</dt><dd>The MprGetDirList will create a list of directory entries.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">bool</td><td>isDir</td><td>
True if the file is a directory.
</td></tr>
<tr><td class="param">bool</td><td>isLink</td><td>
True if the file is a symbolic link.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c">MprTime</a></td><td>lastModified</td><td>
Time the file was last modified.
</td></tr>
<tr><td class="param">char *</td><td>name</td><td>
Name of the file.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1a87e9f435008723c7b1489af1944c6e20">MprOff</a></td><td>size</td><td>
Size of the file.
</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="struct_mpr_dispatcher"></a>
<div class="api">
  <div class="prototype">MprDispatcher</div>
  <div class="apiDetail">
<p>Event Dispatcher.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param"><a class="ref" href="#struct_mpr_cond">MprCond</a> *</td><td>cond</td><td>
Multi-thread sync.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_event">MprEvent</a> *</td><td>currentQ</td><td>
Currently executing event.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_event">MprEvent</a> *</td><td>eventQ</td><td>
Event queue.
</td></tr>
<tr><td class="param">int</td><td>flags</td><td>
Dispatcher control flags.
</td></tr>
<tr><td class="param">int64</td><td>mark</td><td>
Last event sequence mark (may reuse over time).
</td></tr>
<tr><td class="param">cchar *</td><td>name</td><td>
Static debug dispatcher name / purpose.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_dispatcher">MprDispatcher</a> *</td><td>next</td><td>
Next dispatcher linkage.
</td></tr>
<tr><td class="param">MprOsThread</td><td>owner</td><td>
Thread currently dispatching events, otherwise zero.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_dispatcher">MprDispatcher</a> *</td><td>parent</td><td>
Queue pointer.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_dispatcher">MprDispatcher</a> *</td><td>prev</td><td>
Previous dispatcher linkage.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_event_service">MprEventService</a> *</td><td>service</td><td>
Event service reference.
</td></tr>
    </table></dd></dl>
  </div>
</div>
<a name="struct_mpr_event"></a>
<div class="api">
  <div class="prototype">MprEvent</div>
  <div class="apiDetail">
<p>Event object.</p>
    <dl><dt><b>Description</b>:</dt><dd>The MPR provides a powerful priority based eventing mechanism. Events are described by <a class="ref" href="#struct_mpr_event">MprEvent</a> objects which are created and queued via <a class="ref" href="#mpr_8h_1abdf25e12b2bcc5c116599b639cc18d5c">mprCreateEvent</a>. Each event may have a priority and may be one-shot or be continuously rescheduled according to a specified period. The event subsystem provides the basis for callback timers.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param"><a class="ref" href="#struct_mpr_cond">MprCond</a> *</td><td>cond</td><td>
Wait for event to complete.
</td></tr>
<tr><td class="param">void *</td><td>data</td><td>
Event private data (managed|unmanged depending on flags).
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_dispatcher">MprDispatcher</a> *</td><td>dispatcher</td><td>
Event dispatcher service.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319">MprTicks</a></td><td>due</td><td>
When is the event due.
</td></tr>
<tr><td class="param">int</td><td>flags</td><td>
Event flags.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_wait_handler">MprWaitHandler</a> *</td><td>handler</td><td>
Optional wait handler.
</td></tr>
<tr><td class="param">int</td><td>hasRun</td><td>
Event has run.
</td></tr>
<tr><td class="param">int</td><td>mask</td><td>
I/O mask of events.
</td></tr>
<tr><td class="param">cchar *</td><td>name</td><td>
Static debug name of the event.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_event">MprEvent</a> *</td><td>next</td><td>
Next event linkage.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319">MprTicks</a></td><td>period</td><td>
Reschedule period.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_event">MprEvent</a> *</td><td>prev</td><td>
Previous event linkage.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1aca9cf0e331925f694232cd822ed70a56">MprEventProc</a></td><td>proc</td><td>
Callback procedure.
</td></tr>
<tr><td class="param">void *</td><td>sock</td><td>
Optional socket data.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319">MprTicks</a></td><td>timestamp</td><td>
When was the event created.
</td></tr>
    </table></dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a>, <a href="#mpr_8h_1aca9cf0e331925f694232cd822ed70a56" class="ref">MprEventProc</a>, <a href="#struct_mpr_event_service" class="ref">MprEventService</a>, <a href="#mpr_8h_1a1da72b3760024ca15d93ade76de8e33a" class="ref">mprCreateDispatcher</a>, <a href="#mpr_8h_1abdf25e12b2bcc5c116599b639cc18d5c" class="ref">mprCreateEvent</a>, <a href="#mpr_8h_1a8fb1ca3773c88a3bb9c1bddaf63ada99" class="ref">mprCreateTimerEvent</a>, <a href="#mpr_8h_1afd35a965e3ebadc852b8b02aace7a08e" class="ref">mprDestroyDispatcher</a>, <a href="#mpr_8h_1ac9e97afd0732f2d3612d911817357db5" class="ref">mprEnableContinuousEvent</a>, <a href="#mpr_8h_1a58f8c69c9dd399c2e17be36dd5412e88" class="ref">mprGetDispatcher</a>, <a href="#mpr_8h_1a9163bc8e37a8ff05c0c957cfcc86e02e" class="ref">mprRemoveEvent</a>, <a href="#mpr_8h_1a1919da044dd4f62d999526175f76bdc2" class="ref">mprRescheduleEvent</a>, <a href="#mpr_8h_1a6fa51ab06c56baaad50f1b4df7efc1d4" class="ref">mprRestartContinuousEvent</a>, <a href="#mpr_8h_1a205adaee3b45d0cc899afc89eb9f3b3d" class="ref">mprServiceEvents</a>, <a href="#mpr_8h_1ac81ecb3239317f36c36c7d849d738540" class="ref">mprSignalDispatcher</a>, <a href="#mpr_8h_1a1f2c85a20242ec0c1e4830ccd25c7bb7" class="ref">mprStopContinuousEvent</a>, <a href="#mpr_8h_1aa523c291209f9419ad27f8b7be4e231d" class="ref">mprWaitForEvent</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="struct_mpr_event_service"></a>
<div class="api">
  <div class="prototype">MprEventService</div>
  <div class="apiDetail">
<p>Event Service.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param"><a class="ref" href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319">MprTicks</a></td><td>delay</td><td>
Maximum sleep time before awaking.
</td></tr>
<tr><td class="param">int</td><td>eventCount</td><td>
Count of events.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_dispatcher">MprDispatcher</a> *</td><td>idleQ</td><td>
Queue of idle dispatchers.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_mutex">MprMutex</a> *</td><td>mutex</td><td>
Multi-thread sync.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319">MprTicks</a></td><td>now</td><td>
Current notion of system time for the dispatcher service.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_dispatcher">MprDispatcher</a> *</td><td>pendingQ</td><td>
Queue of pending dispatchers (waiting for resources).
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_dispatcher">MprDispatcher</a> *</td><td>readyQ</td><td>
Queue of dispatchers with events ready to run.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_dispatcher">MprDispatcher</a> *</td><td>runQ</td><td>
Queue of running dispatchers.
</td></tr>
<tr><td class="param">MprOsThread</td><td>serviceThread</td><td>
Thread running the dispatcher service.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_cond">MprCond</a> *</td><td>waitCond</td><td>
Waiting sync.
</td></tr>
<tr><td class="param">int</td><td>waiting</td><td>
Waiting for I/O (sleeping).
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_dispatcher">MprDispatcher</a> *</td><td>waitQ</td><td>
Queue of waiting (future) events.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319">MprTicks</a></td><td>willAwake</td><td>
When the event service will next awake.
</td></tr>
    </table></dd></dl>
  </div>
</div>
<a name="struct_mpr_file"></a>
<div class="api">
  <div class="prototype">MprFile</div>
  <div class="apiDetail">
<p>File I/O Module.</p>
    <dl><dt><b>Description</b>:</dt><dd><a class="ref" href="#struct_mpr_file">MprFile</a> is the cross platform File I/O abstraction control structure. An instance will be created when a file is created or opened via <a class="ref" href="#mpr_8h_1a7c2b7b9e2b2aa88b4d742f9b2c5ccfd7">mprOpenFile</a>. Note: Individual files are not thread-safe and should only be used by one file.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">int</td><td>attached</td><td>
Attached to existing descriptor.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_buf">MprBuf</a> *</td><td>buf</td><td>
Buffer for I/O if buffered.
</td></tr>
<tr><td class="param">int</td><td>fd</td><td>
File handle.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_file_system">MprFileSystem</a> *</td><td>fileSystem</td><td>
File system owning this file.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_rom_inode">MprRomInode</a> *</td><td>inode</td><td>
Reference to ROM file.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1a87e9f435008723c7b1489af1944c6e20">MprOff</a></td><td>iopos</td><td>
Raw I/O position <br/>
</td></tr>
<tr><td class="param">int</td><td>mode</td><td>
File open mode.
</td></tr>
<tr><td class="param">char *</td><td>path</td><td>
Filename.
</td></tr>
<tr><td class="param">int</td><td>perms</td><td>
File permissions.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1a87e9f435008723c7b1489af1944c6e20">MprOff</a></td><td>pos</td><td>
Current read position <br/>
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1a87e9f435008723c7b1489af1944c6e20">MprOff</a></td><td>size</td><td>
Current file size.
</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#mpr_8h_1a4410e62e1813571e751d231135522476" class="ref">mprAttachFileFd</a>, <a href="#mpr_8h_1abed0e8f716912b0f4e928c32480a0c06" class="ref">mprCloseFile</a>, <a href="#mpr_8h_1a457be50126337e42f1df6c30af9db510" class="ref">mprDisableFileBuffering</a>, <a href="#mpr_8h_1a04cace2622f3cfe7e8e9ee32bffb12da" class="ref">mprEnableFileBuffering</a>, <a href="#mpr_8h_1a957f3c3051214ee8f105047fee84bc11" class="ref">mprFlushFile</a>, <a href="#mpr_8h_1aef84e97dcc3d31210a7a234a03ac3366" class="ref">mprGetFileChar</a>, <a href="#mpr_8h_1af103e93995d60cca6b94f15b2e77e19f" class="ref">mprGetFileFd</a>, <a href="#mpr_8h_1a437b7eb30b31d38fcedef0aa8617edcc" class="ref">mprGetFilePosition</a>, <a href="#mpr_8h_1a29b58b84303a5345e9cc69bb320fc500" class="ref">mprGetFileSize</a>, <a href="#mpr_8h_1a5e4b8209ae5b091161b043a2dfb45186" class="ref">mprGetStderr</a>, <a href="#mpr_8h_1aa6a0352318f57f09bf9593abbfe324af" class="ref">mprGetStdin</a>, <a href="#mpr_8h_1afddacdfb3b0078d42f936fce928061b2" class="ref">mprGetStdout</a>, <a href="#mpr_8h_1a7c2b7b9e2b2aa88b4d742f9b2c5ccfd7" class="ref">mprOpenFile</a>, <a href="#mpr_8h_1abba294cacccaced9435b1151e2db9c95" class="ref">mprPeekFileChar</a>, <a href="#mpr_8h_1a461e26b7175b96b6953e02e16219b426" class="ref">mprPutFileChar</a>, <a href="#mpr_8h_1a139515262948d6bd2f03d802d8fff34e" class="ref">mprPutFileString</a>, <a href="#mpr_8h_1a5edc60c8f5b38c394accf29cd6785f96" class="ref">mprReadFile</a>, <a href="#mpr_8h_1a3a06b0b88d6cece00b874fe2bb4102f8" class="ref">mprReadLine</a>, <a href="#mpr_8h_1aaddd841fab4eb81ea0cefed2c24b5d1c" class="ref">mprSeekFile</a>, <a href="#mpr_8h_1a61cd5b0e215e4dafa26f90839cc9429e" class="ref">mprTruncateFile</a>, <a href="#mpr_8h_1a48b31d54e03c997a5e6b43d070cfa4ac" class="ref">mprWriteFile</a>, <a href="#mpr_8h_1aeb6dab1b192031ce9363f10437d2499e" class="ref">mprWriteFileFmt</a>, <a href="#mpr_8h_1aef877b6efa649b5af610862cf06a3a11" class="ref">mprWriteFileString</a></dd></dl>
  </div>
</div>
<a name="struct_mpr_file_system"></a>
<div class="api">
  <div class="prototype">MprFileSystem</div>
  <div class="apiDetail">
<p>File system service.</p>
    <dl><dt><b>Description</b>:</dt><dd>The MPR provides a file system abstraction to support non-disk based file access such as flash or other ROM based file systems. The <a class="ref" href="#struct_mpr_file_system">MprFileSystem</a> structure defines a virtual file system interface that will be invoked by the various MPR file routines.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">MprAccessFileProc</td><td>accessPath</td><td>
Virtual access file routine.
</td></tr>
<tr><td class="param">bool</td><td>caseSensitive</td><td>
Path comparisons are case sensitive.
</td></tr>
<tr><td class="param">MprCloseFileProc</td><td>closeFile</td><td>
Virtual close file routine.
</td></tr>
<tr><td class="param">MprDeleteFileProc</td><td>deletePath</td><td>
Virtual delete file routine.
</td></tr>
<tr><td class="param">MprGetPathInfoProc</td><td>getPathInfo</td><td>
Virtual get file information routine.
</td></tr>
<tr><td class="param">MprGetPathLinkProc</td><td>getPathLink</td><td>
Virtual get the symbolic link target.
</td></tr>
<tr><td class="param">bool</td><td>hasDriveSpecs</td><td>
Paths can have drive specifications.
</td></tr>
<tr><td class="param">MprListDirProc</td><td>listDir</td><td>
Virtual get directory list.
</td></tr>
<tr><td class="param">MprMakeDirProc</td><td>makeDir</td><td>
Virtual make directory routine.
</td></tr>
<tr><td class="param">MprMakeLinkProc</td><td>makeLink</td><td>
Virtual make link routine.
</td></tr>
<tr><td class="param">char *</td><td>newline</td><td>
Newline for text files.
</td></tr>
<tr><td class="param">MprOpenFileProc</td><td>openFile</td><td>
Virtual open file routine.
</td></tr>
<tr><td class="param">MprReadFileProc</td><td>readFile</td><td>
Virtual read file routine.
</td></tr>
<tr><td class="param">cchar *</td><td>root</td><td>
Root file path.
</td></tr>
<tr><td class="param">MprSeekFileProc</td><td>seekFile</td><td>
Virtual seek file routine.
</td></tr>
<tr><td class="param">char *</td><td>separators</td><td>
Filename path separators. 
First separator is the preferred separator.
</td></tr>
<tr><td class="param">MprSetBufferedProc</td><td>setBuffered</td><td>
Virtual set buffered I/O routine.
</td></tr>
<tr><td class="param">MprTruncateFileProc</td><td>truncateFile</td><td>
Virtual truncate file routine.
</td></tr>
<tr><td class="param">MprWriteFileProc</td><td>writeFile</td><td>
Virtual write file routine.
</td></tr>
    </table></dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#struct_mpr_rom_inode" class="ref">MprRomInode</a>, <a href="#mpr_8h_1aace8a812b003454accd5f45079b8dd24" class="ref">mprAddFileSystem</a>, <a href="#mpr_8h_1af056d41b7726fec58ee0381773d2d7df" class="ref">mprCreateDiskFileSystem</a>, <a href="#mpr_8h_1a84ae1c2805746ecb946f3bb7f65107c0" class="ref">mprCreateRomFileSystem</a>, <a href="#mpr_8h_1af9996ff8e70915b7d1273f19bb198e2a" class="ref">mprLookupFileSystem</a>, <a href="#mpr_8h_1a10d97267fcc49bb5126547b3a520d812" class="ref">mprSetPathNewline</a>, <a href="#mpr_8h_1a604f5f0da674b354c16dc30be6f058d2" class="ref">mprSetPathSeparators</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="struct_mpr_float"></a>
<div class="api">
  <div class="prototype">MprFloat</div>
  <div class="apiDetail">
<p>Floating Point Services.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
    </table></dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#mpr_8h_1a00cde73edc55911e4ba714f445544502" class="ref">mprIsInfinite</a>, <a href="#mpr_8h_1a05a04872e6d51bca40b2223e466984b7" class="ref">mprIsNan</a>, <a href="#mpr_8h_1afb9eede8122d445daefbadd3122bba42" class="ref">mprIsZero</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="struct_mpr_free_mem"></a>
<div class="api">
  <div class="prototype">MprFreeMem</div>
  <div class="apiDetail">
<p>Block structure when on a free list.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">struct <a class="ref" href="#struct_mpr_free_mem">MprFreeMem</a> *</td><td>next</td><td>
Next free block.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_free_mem">MprFreeMem</a> *</td><td>prev</td><td>
Previous free block.
</td></tr>
    </table></dd></dl>
  </div>
</div>
<a name="struct_mpr_free_queue"></a>
<div class="api">
  <div class="prototype">MprFreeQueue</div>
  <div class="apiDetail">
<p>Free queue head structure.</p>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param"><a class="ref" href="#struct_mpr_mem">MprMem</a></td><td>blk</td><td>
Unused in queue head.
</td></tr>
<tr><td class="param">uint</td><td>count</td><td>
Number of blocks on the queue.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_spin">MprSpin</a></td><td>lock</td><td>
Queue lock-free lock.
</td></tr>
<tr><td class="param">MprMemSize</td><td>minSize</td><td>
Minimum size of blocks in queue. 
This is the user block size sans <a class="ref" href="#struct_mpr_mem">MprMem</a> header.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_free_mem">MprFreeMem</a> *</td><td>next</td><td>
Next free block.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_free_mem">MprFreeMem</a> *</td><td>prev</td><td>
Previous free block.
</td></tr>
    </table></dd></dl>
  </div>
</div>
<a name="struct_mpr_hash"></a>
<div class="api">
  <div class="prototype">MprHash</div>
  <div class="apiDetail">
<p>Hash table control structure.</p>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param"><a class="ref" href="#struct_mpr_key">MprKey</a> **</td><td>buckets</td><td>
Hash collision bucket table.
</td></tr>
<tr><td class="param">int</td><td>flags</td><td>
Hash control flags.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1aa9cd2db453ee649412b1003cfcce710c">MprHashProc</a></td><td>fn</td><td>
Hash function.
</td></tr>
<tr><td class="param">int</td><td>length</td><td>
Number of symbols in the table.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_mutex">MprMutex</a> *</td><td>mutex</td><td>
GC marker sync.
</td></tr>
<tr><td class="param">int</td><td>size</td><td>
Size of the buckets array.
</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="struct_mpr_heap"></a>
<div class="api">
  <div class="prototype">MprHeap</div>
  <div class="apiDetail">
<p>Memory allocator heap.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">int</td><td>allocPolicy</td><td>
Memory allocation depletion policy.
</td></tr>
<tr><td class="param">int</td><td>collecting</td><td>
Manual GC is running.
</td></tr>
<tr><td class="param">int</td><td>compact</td><td>
Next GC sweep should do a full compact.
</td></tr>
<tr><td class="param">int</td><td>flags</td><td>
GC operational control flags.
</td></tr>
<tr><td class="param">int</td><td>freedBlocks</td><td>
True if the last sweep freed blocks.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_free_queue">MprFreeQueue</a></td><td>freeq[MPR_ALLOC_NUM_QUEUES]</td><td>
Heap free queues.
</td></tr>
<tr><td class="param">int</td><td>from</td><td>
Eligible mprCollectGarbage flags.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_cond">MprCond</a> *</td><td>gcCond</td><td>
GC sleep cond var.
</td></tr>
<tr><td class="param">int</td><td>gcEnabled</td><td>
GC is enabled.
</td></tr>
<tr><td class="param">int</td><td>gcRequested</td><td>
GC has been requested.
</td></tr>
<tr><td class="param">int</td><td>hasError</td><td>
Memory allocation error.
</td></tr>
<tr><td class="param">uchar</td><td>mark</td><td>
Mark version.
</td></tr>
<tr><td class="param">int</td><td>marking</td><td>
Actually marking objects now.
</td></tr>
<tr><td class="param">int</td><td>mustYield</td><td>
Threads must yield for GC which is due.
</td></tr>
<tr><td class="param">int</td><td>nextSeqno</td><td>
Next sequence number.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1ac7be61c63c8a92243c67986431c48083">MprMemNotifier</a></td><td>notifier</td><td>
Memory allocation failure callback.
</td></tr>
<tr><td class="param">int</td><td>pageSize</td><td>
System page size.
</td></tr>
<tr><td class="param">int</td><td>printStats</td><td>
Print diagnostic heap statistics.
</td></tr>
<tr><td class="param">uint64</td><td>priorFree</td><td>
Last sweep free memory.
</td></tr>
<tr><td class="param">uint64</td><td>priorWorkDone</td><td>
Prior workDone before last sweep.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_region">MprRegion</a> *</td><td>regions</td><td>
List of memory regions.
</td></tr>
<tr><td class="param">int</td><td>regionSize</td><td>
Memory allocation region size.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_list">MprList</a> *</td><td>roots</td><td>
List of GC root objects.
</td></tr>
<tr><td class="param">int</td><td>scribble</td><td>
Scribble over freed memory (slow).
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_mem_stats">MprMemStats</a></td><td>stats</td><td>
Memory allocation statistics.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_thread">MprThread</a> *</td><td>sweeper</td><td>
GC sweeper thread.
</td></tr>
<tr><td class="param">int</td><td>sweeping</td><td>
Actually sweeping objects now.
</td></tr>
<tr><td class="param">int</td><td>track</td><td>
Track memory allocations (requires ME_MPR_ALLOC_DEBUG).
</td></tr>
<tr><td class="param">int</td><td>verify</td><td>
Verify memory contents (very slow).
</td></tr>
<tr><td class="param">uint64</td><td>workDone</td><td>
Count of allocations weighted by block size.
</td></tr>
<tr><td class="param">uint64</td><td>workQuota</td><td>
Quota of work done before idle GC worthwhile.
</td></tr>
    </table></dd></dl>
  </div>
</div>
<a name="struct_mpr_i_o_vec"></a>
<div class="api">
  <div class="prototype">MprIOVec</div>
  <div class="apiDetail">
<p>Vectored write array.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">ssize</td><td>len</td><td>
Length of block to write.
</td></tr>
<tr><td class="param">char *</td><td>start</td><td>
Start of block to write.
</td></tr>
    </table></dd></dl>
  </div>
</div>
<a name="struct_mpr_json"></a>
<div class="api">
  <div class="prototype">MprJson</div>
  <div class="apiDetail">
<p>JSON Object.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">struct <a class="ref" href="#struct_mpr_json">MprJson</a> *</td><td>children</td><td>
Children properties.
</td></tr>
<tr><td class="param">int</td><td>length</td><td>
Number of child properties.
</td></tr>
<tr><td class="param">cchar *</td><td>name</td><td>
Property name for this object.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_json">MprJson</a> *</td><td>next</td><td>
Next sibling.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_json">MprJson</a> *</td><td>prev</td><td>
Previous sibling.
</td></tr>
<tr><td class="param">int</td><td>type</td><td>
Property type. 
Object, Array or value.
</td></tr>
<tr><td class="param">cchar *</td><td>value</td><td>
Property value - always strings.
</td></tr>
    </table></dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#mpr_8h_1ae916ca4eacb71b4fda228fa7cbb977d3" class="ref">mprBlendJson</a>, <a href="#mpr_8h_1a559d9a940422ebfa981b1cf51f72020d" class="ref">mprGetJson</a>, <a href="#mpr_8h_1a96b8f4d7945990fc3f2a942af43cab32" class="ref">mprGetJsonLength</a>, <a href="#mpr_8h_1a05e2cff598f473615cb1ef4b82dcfd31" class="ref">mprGetJsonObj</a>, <a href="#mpr_8h_1a40fe70c168712e6e9b6d89dd84ca1113" class="ref">mprJsonToString</a>, <a href="#mpr_8h_1affc6fc3de28ebfced024b0e60bb8d242" class="ref">mprLoadJson</a>, <a href="#mpr_8h_1a140cca664bd923f04c12eaa3cbc3f516" class="ref">mprLogJson</a>, <a href="#mpr_8h_1a0de687b086c6e81c5c8e32c999cdc29f" class="ref">mprParseJson</a>, <a href="#mpr_8h_1a006af99fb3614d9088e5ee1c5b030fc0" class="ref">mprParseJsonEx</a>, <a href="#mpr_8h_1a5fe7d3512b827892ecade02699d05e70" class="ref">mprParseJsonInto</a>, <a href="#mpr_8h_1a870629694aae99d61e7c42724b687177" class="ref">mprQueryJson</a>, <a href="#mpr_8h_1ac4d45407221833dab580a985f5683a3a" class="ref">mprReadJson</a>, <a href="#mpr_8h_1aa148c1b0444356002340f837bfb289db" class="ref">mprRemoveJson</a>, <a href="#mpr_8h_1aa19ca22bc6745f7d28d295dfe8dffb15" class="ref">mprSetJson</a>, <a href="#mpr_8h_1a5cbd801cd3f61932e4e7273b0cfada2e" class="ref">mprSetJsonError</a>, <a href="#mpr_8h_1a23d9bdbb739d0a21de0e0bbc98e6ee03" class="ref">mprSetJsonObj</a>, <a href="#mpr_8h_1a569224eeaff8680b96b680e3ba5dc02a" class="ref">mprWriteJson</a>, <a href="#mpr_8h_1a8db37813e63d921df8f5956cc453392c" class="ref">mprWriteJsonObj</a>, <a href="#mpr_8h_1a8db37813e63d921df8f5956cc453392c" class="ref">mprWriteJsonObj</a></dd></dl>
  </div>
</div>
<a name="struct_mpr_json_callback"></a>
<div class="api">
  <div class="prototype">MprJsonCallback</div>
  <div class="apiDetail">
<p>JSON parsing callbacks.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">int(*</td><td>checkBlock) (struct MprJsonParser *parser, cchar *name, bool leave)</td><td>
Check state callback for JSON deserialization. 
This function is called at the entry and exit of object levels for arrays and objects.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_json">MprJson</a> *(*</td><td>createObj) (struct MprJsonParser *parser, int type)</td><td>
MakeObject callback for JSON deserialization. 
This function is called to construct an object for each level in the object tree. Objects will be either arrays or objects.
</td></tr>
<tr><td class="param">bool(*</td><td>match) (struct MprJsonParser *parser, cchar *str, cchar *pattern)</td><td>
Pattern matching callback.
</td></tr>
<tr><td class="param">void(*</td><td>parseError) (struct MprJsonParser *parser, cchar *msg)</td><td>
Handle a parse error. 
This function is called from mprSetJsonError to handle error reporting.
</td></tr>
<tr><td class="param">int(*</td><td>setValue) (struct MprJsonParser *parser, MprJson *obj, cchar *name, MprJson *child)</td><td>
Set a property value in an object.
</td></tr>
    </table></dd></dl>
  </div>
</div>
<a name="struct_mpr_json_parser"></a>
<div class="api">
  <div class="prototype">MprJsonParser</div>
  <div class="apiDetail">
<p>JSON parser.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
    </table></dd></dl>
  </div>
</div>
<a name="struct_mpr_key"></a>
<div class="api">
  <div class="prototype">MprKey</div>
  <div class="apiDetail">
<p>Hash table entry structure.</p>
    <dl><dt><b>Description</b>:</dt><dd>The hash structure supports growable hash tables with high performance, collision resistant hashes. Each hash entry has a descriptor entry. This is used to manage the hash table link chains.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">int</td><td>bucket</td><td>
Hash bucket index.
</td></tr>
<tr><td class="param">cvoid *</td><td>data</td><td>
Pointer to symbol data (managed).
</td></tr>
<tr><td class="param">char *</td><td>key</td><td>
Hash key.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_key">MprKey</a> *</td><td>next</td><td>
Next symbol in hash chain.
</td></tr>
<tr><td class="param">int</td><td>type</td><td>
Data type.
</td></tr>
    </table></dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#struct_mpr_hash" class="ref">MprHash</a>, <a href="#mpr_8h_1aa9cd2db453ee649412b1003cfcce710c" class="ref">MprHashProc</a>, <a href="#mpr_8h_1a5160d52c756eb2c01ee97657c1a6f678" class="ref">mprAddKey</a>, <a href="#mpr_8h_1ae8cce7d49083048e263517335bcdbfa8" class="ref">mprAddKeyFmt</a>, <a href="#mpr_8h_1ae82b297b198628e711f84fc62ff9d0f6" class="ref">mprBlendHash</a>, <a href="#mpr_8h_1a0e4b242b3211bdc24c17d1c83ef77ad2" class="ref">mprCloneHash</a>, <a href="#mpr_8h_1a18bd67b1021247082ff8e853966dc361" class="ref">mprCreateHash</a>, <a href="#mpr_8h_1a0604f7e2cf28a39f0fa608f2365ae426" class="ref">mprGetFirstKey</a>, <a href="#mpr_8h_1a2c078b228b88412f5d922e45c9002c5c" class="ref">mprGetHashLength</a>, <a href="#mpr_8h_1a9644a249a4851fabce945c85c2a0965c" class="ref">mprGetNextKey</a>, <a href="#mpr_8h_1a5b3e1f1d4e80038ece3362c328c43820" class="ref">mprLookupKey</a>, <a href="#mpr_8h_1a88479632e016f3def6fc4361ee8f896a" class="ref">mprLookupKeyEntry</a>, <a href="#mpr_8h_1a1257962021e54d8c6156e49031b7a8ec" class="ref">mprRemoveKey</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="struct_mpr_key_value"></a>
<div class="api">
  <div class="prototype">MprKeyValue</div>
  <div class="apiDetail">
<p>Key value pairs for use with <a class="ref" href="#struct_mpr_list">MprList</a> or <a class="ref" href="#struct_mpr_key">MprKey</a></p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">int</td><td>flags</td><td>
General flags word.
</td></tr>
<tr><td class="param">void *</td><td>key</td><td>
Key string (managed).
</td></tr>
<tr><td class="param">void *</td><td>value</td><td>
Associated value for the key (managed).
</td></tr>
    </table></dd></dl>
  </div>
</div>
<a name="struct_mpr_list"></a>
<div class="api">
  <div class="prototype">MprList</div>
  <div class="apiDetail">
<p>List data structure.</p>
    <dl><dt><b>Description</b>:</dt><dd>The <a class="ref" href="#struct_mpr_list">MprList</a> is a dynamic, growable list suitable for storing pointers to arbitrary objects.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">int</td><td>flags</td><td>
Control flags.
</td></tr>
<tr><td class="param">void **</td><td>items</td><td>
List item data.
</td></tr>
<tr><td class="param">int</td><td>length</td><td>
Current length of the list contents.
</td></tr>
<tr><td class="param">int</td><td>maxSize</td><td>
Maximum capacity.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_mutex">MprMutex</a> *</td><td>mutex</td><td>
Multithread lock.
</td></tr>
<tr><td class="param">int</td><td>size</td><td>
Current list capacity.
</td></tr>
    </table></dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#mpr_8h_1a06e53583e17e8a5803d1bdabf523e827" class="ref">MprListCompareProc</a>, <a href="#mpr_8h_1abf10109abc063c47702769c0e89442cf" class="ref">mprAddItem</a>, <a href="#mpr_8h_1a8a5c06bd4458f58c9ed20d043b21bba3" class="ref">mprAddNullItem</a>, <a href="#mpr_8h_1a31498982b50be3573536bb4cd5acaee2" class="ref">mprAppendList</a>, <a href="#mpr_8h_1acf49292693e22c7bdc43fbb41a83817d" class="ref">mprClearList</a>, <a href="#mpr_8h_1a177c262ad7aec553d0ba5a3925aeddb5" class="ref">mprCloneList</a>, <a href="#mpr_8h_1aa32ad3675623f779762d9580de7dccec" class="ref">mprCreateKeyPair</a>, <a href="#mpr_8h_1aad013e1bb3447a42920f013eceebf174" class="ref">mprCreateList</a>, <a href="#mpr_8h_1a34cb920bcebf2bf6559a50b68788f74b" class="ref">mprGetFirstItem</a>, <a href="#mpr_8h_1a7fd7e14f0616cb9802638d654678bf0b" class="ref">mprGetItem</a>, <a href="#mpr_8h_1ad52b353a178af2cee98aedfef0aa7988" class="ref">mprGetLastItem</a>, <a href="#mpr_8h_1ac47331b3442493d84405d32ffcb98aba" class="ref">mprGetListCapacity</a>, <a href="#mpr_8h_1ab8c4852b9d8de93f10389b6caa326011" class="ref">mprGetNextItem</a>, <a href="#mpr_8h_1a2238e3929c319d66ffbd5b5ad0d7a180" class="ref">mprGetPrevItem</a>, <a href="#mpr_8h_1a0c797a3ea868662ad6dabb35f5255399" class="ref">mprInitList</a>, <a href="#mpr_8h_1af3e8599ae4707459cf42ad960256af98" class="ref">mprInsertItemAtPos</a>, <a href="#mpr_8h_1a8b3d6afe4be8d416e28f64d05e8391eb" class="ref">mprLookupItem</a>, <a href="#mpr_8h_1a8b32a32be34fbcc2194767eb7031a3ad" class="ref">mprLookupStringItem</a>, <a href="#mpr_8h_1a9b2b7113051a42a49734d88335ee543c" class="ref">mprPopItem</a>, <a href="#mpr_8h_1a7f35b9db9fe36c3bf91954c6acb98467" class="ref">mprPushItem</a>, <a href="#mpr_8h_1aa7e9868693c4c804b2c356509dcbb798" class="ref">mprRemoveItem</a>, <a href="#mpr_8h_1ac758d5af71b0bbf943bb6a1e263a494c" class="ref">mprRemoveItemAtPos</a>, <a href="#mpr_8h_1a16748fa2520761d373cebe4b39be3e8e" class="ref">mprRemoveRangeOfItems</a>, <a href="#mpr_8h_1a7d948c448d34a433b728c7a19aae1814" class="ref">mprRemoveStringItem</a>, <a href="#mpr_8h_1a9f47ecd1bfa2a2ef8f530fc395a10950" class="ref">mprSetItem</a>, <a href="#mpr_8h_1a38bd862a8bc3076d86b0185d5bd81aa6" class="ref">mprSetListLimits</a>, <a href="#mpr_8h_1a66e67b9938519486e9cb190582731999" class="ref">mprSortList</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="struct_mpr_log"></a>
<div class="api">
  <div class="prototype">MprLog</div>
  <div class="apiDetail">
<p>Logging Services.</p>
    <dl><dt>See Also:</dt><dd>
    <a href="#mpr_8h_1a8fdb97b78014d2a084a4747a35b3235a" class="ref">MprLogHandler</a>, <a href="#mpr_8h_1a912d39c3467b133438b984c79c02aee3" class="ref">mprAssert</a>, <a href="#mpr_8h_1a3e8ec0097e4869fe9847da2c3b0eca48" class="ref">mprError</a>, <a href="#mpr_8h_1aa06509c35e52b3873c34586d6986a343" class="ref">mprGetLogFile</a>, <a href="#mpr_8h_1a793de5b45b6675f852c98d3127e5dc24" class="ref">mprGetLogHandler</a>, <a href="#mpr_8h_1a02941fa13af43f80adda4840d94f215b" class="ref">mprSetLogFile</a>, <a href="#mpr_8h_1a834e7ceec5efa68d0d73eb45c3c69780" class="ref">mprSetLogHandler</a>, <a href="#mpr_8h_1a5072dbfb7278b3247096146ead8b7162" class="ref">mprSetLogLevel</a>, <a href="#mpr_8h_1a55085e339b37476746b29118be44cca3" class="ref">mprUsingDefaultLogHandler</a></dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="struct_mpr_mem"></a>
<div class="api">
  <div class="prototype">MprMem</div>
  <div class="apiDetail">
<p>Memory Allocation Service.</p>
    <dl><dt><b>Description</b>:</dt><dd>The MPR provides an application specific memory allocator to use instead of malloc. This allocator is tailored to the needs of embedded applications and is faster than most general purpose malloc allocators. It is deterministic and allocates and frees in constant time O(1). It exhibits very low fragmentation and accurate coalescing. <br/><br/>
The allocator uses a garbage collector for freeing unused memory. The collector is a cooperative, non-compacting, parallel collector. The allocator is optimized for frequent allocations of small blocks (&lt; 4K) and uses a scheme of free queues for fast allocation. Allocations are aligned as specified by ME_MPR_ALLOC_ALIGN_SHIFT. This is typically 16 byte aligned for 64-bit systems and 8 byte aligned for 32-bit systems. The allocator will return unused memory back to the O/S to minimize application memory footprint. <br/><br/>
The allocator handles memory allocation errors globally. The application may configure a memory limit so that memory depletion can be proactively detected and handled before memory allocations actually fail. <br/><br/>
A memory block that is being used must be marked as active to prevent the garbage collector from reclaiming it. To mark a block as active, <a class="ref" href="#mpr_8h_1ac1eebe67d99890d0156d6fdd7fc2c7c8">mprMark</a> must be called during each garbage collection cycle. When allocating non-temporal memory blocks, a manager callback can be specified via mprAllocObj. This manager routine will be called by the collector so that dependent memory blocks can be marked as active. <br/><br/>
The collector performs the marking phase by invoking the manager routines for a set of root blocks. A block can be added to the set of roots by calling <a class="ref" href="#mpr_8h_1a3b66bfcf86dc9f50510341e7b5490326">mprAddRoot</a>. Each root&apos;s manager routine will mark other blocks which will cause their manager routines to run and so on, until all active blocks have been marked. Non-marked blocks can then safely be reclaimed as garbage. A block may alternatively be permanently marked as active by calling <a class="ref" href="#mpr_8h_1aac8a75ae42130538e13d4e84ccb030f4">mprHold</a>. <br/><br/>
The mark phase begins when all threads explicitly &quot;yield&quot; to the garbage collector. This cooperative approach ensures that user threads will not inadvertendly loose allocated blocks to the collector. Once all active blocks are marked, user threads are resumed and the garbage sweeper frees unused blocks in parallel with user threads.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">uchar</td><td>eternal</td><td>
Immune from GC. 
Implemented as a byte to be atomic.
</td></tr>
<tr><td class="param">uchar</td><td>first</td><td>
Block is first block in region.
</td></tr>
<tr><td class="param">uchar</td><td>free</td><td>
Block not in use.
</td></tr>
<tr><td class="param">uchar</td><td>fullRegion</td><td>
Block is an entire region - never on free queues.
</td></tr>
<tr><td class="param">uchar</td><td>hasManager</td><td>
Has manager function. 
Set at block init.
</td></tr>
<tr><td class="param">uchar</td><td>mark</td><td>
GC mark indicator. 
Toggled for each GC pass by <a class="ref" href="#struct_mpr_mem_1a537e984d818c0748051017d2852ca055">mark()</a> when thread yielded.
</td></tr>
<tr><td class="param">uchar</td><td>qindex</td><td>
Freeq index. 
Always less than 512 queues.
</td></tr>
<tr><td class="param">MprMemSize</td><td>size</td><td>
Size of the block in bytes. 
Not the amount requested by the user which may be smaller. This is a 32-bit quantity on all systems unless ME_MPR_ALLOC_BIG is defined and then it will be 64 bits.
</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#struct_mpr_free_mem" class="ref">MprFreeMem</a>, <a href="#struct_mpr_heap" class="ref">MprHeap</a>, <a href="#mpr_8h_1ad5e84d898dd29853b54cc1b49fcb4041" class="ref">MprManager</a>, <a href="#mpr_8h_1ac7be61c63c8a92243c67986431c48083" class="ref">MprMemNotifier</a>, <a href="#struct_mpr_region" class="ref">MprRegion</a>, <a href="#mpr_8h_1a3b66bfcf86dc9f50510341e7b5490326" class="ref">mprAddRoot</a>, <a href="#mpr_8h_1a6e7ed2574cd71cdf20ae4467f18b4ce9" class="ref">mprAllocMem</a>, <a href="#mpr_8h_1a89524cfbcea2fc955ae583ac90e53368" class="ref">mprCreateMemService</a>, <a href="#mpr_8h_1a4e34537a9123922eb0bac5e9844c68b1" class="ref">mprEnableGC</a>, <a href="#mpr_8h_1a748a0f879d3b5ce8cb8eb23b01392552" class="ref">mprGC</a>, <a href="#mpr_8h_1a4c9028aba8f82b48191035aa3a191d81" class="ref">mprGetBlockSize</a>, <a href="#mpr_8h_1a279d76fb52ed630587e1e97612172a5c" class="ref">mprGetMem</a>, <a href="#mpr_8h_1a99dc8d54f9cf15941879227b4029e8b4" class="ref">mprGetMemStats</a>, <a href="#mpr_8h_1add3d2fbe6368f4e0eecb870c22e96d32" class="ref">mprGetMpr</a>, <a href="#mpr_8h_1ae7c3778c00352aea0b3c0b6cfac662e8" class="ref">mprGetPageSize</a>, <a href="#mpr_8h_1a88bd0a2f9a3d1fb30b5a2117375d00b3" class="ref">mprHasMemError</a>, <a href="#mpr_8h_1aac8a75ae42130538e13d4e84ccb030f4" class="ref">mprHold</a>, <a href="#mpr_8h_1af9bf23ba3a4c680f860f8d392b17576c" class="ref">mprIsPathContained</a>, <a href="#mpr_8h_1a60f5c1f8065e2d164160fbc71275d300" class="ref">mprIsValid</a>, <a href="#mpr_8h_1ac1eebe67d99890d0156d6fdd7fc2c7c8" class="ref">mprMark</a>, <a href="#mpr_8h_1a1e8d2072b9923ca7a579d9dabbad1ea3" class="ref">mprMemcmp</a>, <a href="#mpr_8h_1a115724cd4423263288212f7a300f21d7" class="ref">mprMemcpy</a>, <a href="#mpr_8h_1ae5a3493548a457c179c0f7006d6171a9" class="ref">mprPrintMem</a>, <a href="#mpr_8h_1a4816868550ad8a21b914de2fbe720767" class="ref">mprRelease</a>, <a href="#mpr_8h_1a369beaea43886e4fdd3d4549a2c13cb7" class="ref">mprRemoveRoot</a>, <a href="#mpr_8h_1a0d6ef2dfceedfe111eb55bc88c4435ba" class="ref">mprResetMemError</a>, <a href="#mpr_8h_1ac16b2cfc057a6df9c6012a9005edf64d" class="ref">mprSetManager</a>, <a href="#mpr_8h_1ae50c8f8027adb12b70482afa8b3b979f" class="ref">mprSetMemError</a>, <a href="#mpr_8h_1ab0b7e384d28606a450f21bc50a8b0c12" class="ref">mprSetMemLimits</a>, <a href="#mpr_8h_1a32742d6a82477fabee9c821138ffd824" class="ref">mprSetMemNotifier</a>, <a href="#mpr_8h_1a282926d76d53bde980ec5f5c5004a3b3" class="ref">mprSetMemPolicy</a>, <a href="#mpr_8h_1a312cc2081a581e190c6f8d0107727aa0" class="ref">mprVirtAlloc</a>, <a href="#mpr_8h_1a6d3bd582a0bdcafa69428aa29c0279c8" class="ref">mprVirtFree</a></dd></dl>
  </div>
</div>
<a name="struct_mpr_mem_stats"></a>
<div class="api">
  <div class="prototype">MprMemStats</div>
  <div class="apiDetail">
<p>Memory allocator statistics.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">uint64</td><td>bytesAllocated</td><td>
Bytes currently allocated. 
Includes active and free.
</td></tr>
<tr><td class="param">uint64</td><td>bytesAllocatedPeak</td><td>
Max ever bytes allocated.
</td></tr>
<tr><td class="param">uint64</td><td>bytesFree</td><td>
Bytes currently free and retained in the heap queues.
</td></tr>
<tr><td class="param">uint64</td><td>cacheHeap</td><td>
Heap cache. 
Try to keep at least this amount in the free queues <br/>
</td></tr>
<tr><td class="param">uint</td><td>cpuCores</td><td>
Number of CPU cores.
</td></tr>
<tr><td class="param">uint64</td><td>cpuUsage</td><td>
Process CPU usage in ticks.
</td></tr>
<tr><td class="param">uint64</td><td>errors</td><td>
Allocation errors.
</td></tr>
<tr><td class="param">uint</td><td>heapRegions</td><td>
Heap region count.
</td></tr>
<tr><td class="param">int</td><td>inMemException</td><td>
Recursive protect.
</td></tr>
<tr><td class="param">uint64</td><td>lowHeap</td><td>
Low memory level at which to initiate a collection.
</td></tr>
<tr><td class="param">uint64</td><td>maxHeap</td><td>
Max memory that can be allocated.
</td></tr>
<tr><td class="param">uint</td><td>pageSize</td><td>
System page size.
</td></tr>
<tr><td class="param">uint64</td><td>ram</td><td>
System RAM size in bytes.
</td></tr>
<tr><td class="param">uint64</td><td>rss</td><td>
OS calculated memory resident set size in bytes.
</td></tr>
<tr><td class="param">uint</td><td>sweeps</td><td>
Number of GC sweeps.
</td></tr>
<tr><td class="param">uint64</td><td>swept</td><td>
Number of blocks swept.
</td></tr>
<tr><td class="param">uint64</td><td>sweptBytes</td><td>
Number of bytes swept.
</td></tr>
<tr><td class="param">uint64</td><td>user</td><td>
System user RAM size in bytes (excludes kernel).
</td></tr>
<tr><td class="param">uint64</td><td>warnHeap</td><td>
Warn if heap size exceeds this level.
</td></tr>
    </table></dd></dl>
  </div>
</div>
<a name="struct_mpr_mime"></a>
<div class="api">
  <div class="prototype">MprMime</div>
  <div class="apiDetail">
<p>Mime Type hash table entry (the URL extension is the key).</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">char *</td><td>program</td><td>
Mime type string.
</td></tr>
<tr><td class="param">char *</td><td>type</td><td>
Mime type string.
</td></tr>
    </table></dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#mpr_8h_1a9a1e42096f8a786e2f7836440aab492f" class="ref">mprAddMime</a>, <a href="#mpr_8h_1aa2c27762b461480e0fa9e8e5090e0d66" class="ref">mprCreateMimeTypes</a>, <a href="#mpr_8h_1a0546da53b26c8a264b778b07461746c0" class="ref">mprGetMimeProgram</a>, <a href="#mpr_8h_1a43fc54484f303196cb3fb66c73fb0205" class="ref">mprLookupMime</a>, <a href="#mpr_8h_1a5f1165a45b9a43aed99b1e25900b0fbd" class="ref">mprSetMimeProgram</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="struct_mpr_module"></a>
<div class="api">
  <div class="prototype">MprModule</div>
  <div class="apiDetail">
<p>Loadable Module Service.</p>
    <dl><dt><b>Description</b>:</dt><dd>The MPR provides services to load and unload shared libraries.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">char *</td><td>entry</td><td>
Module library init entry point.
</td></tr>
<tr><td class="param">int</td><td>flags</td><td>
Module control flags.
</td></tr>
<tr><td class="param">void *</td><td>handle</td><td>
O/S shared library load handle.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319">MprTicks</a></td><td>lastActivity</td><td>
When the module was last used.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c">MprTime</a></td><td>modified</td><td>
When the module file was last modified.
</td></tr>
<tr><td class="param">void *</td><td>moduleData</td><td>
Module specific data - not managed unless MPR_MODULE_DATA_MANAGED.
</td></tr>
<tr><td class="param">char *</td><td>name</td><td>
Unique module name.
</td></tr>
<tr><td class="param">char *</td><td>path</td><td>
Module library filename.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1a98c47ddbb625a457617163f7aeeb0edb">MprModuleProc</a></td><td>start</td><td>
Start the module.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1a98c47ddbb625a457617163f7aeeb0edb">MprModuleProc</a></td><td>stop</td><td>
Stop the module. 
Should be unloadable after stopping.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319">MprTicks</a></td><td>timeout</td><td>
Inactivity unload timeout.
</td></tr>
    </table></dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#mpr_8h_1ac3925ae824a9d13aacc476ba20341925" class="ref">MprModuleEntry</a>, <a href="#mpr_8h_1a98c47ddbb625a457617163f7aeeb0edb" class="ref">MprModuleProc</a>, <a href="#mpr_8h_1a35f4f35014f5601bb37ba7bbfcac62be" class="ref">mprCreateModule</a>, <a href="#mpr_8h_1a0e9b22f07aca1f18bcad2e73147a5de3" class="ref">mprGetModuleSearchPath</a>, <a href="#mpr_8h_1a0635aab03b2954a722a39dd5e2545312" class="ref">mprLoadModule</a>, <a href="#mpr_8h_1a585388ae65782b535dcea572e65ed94b" class="ref">mprLoadNativeModule</a>, <a href="#mpr_8h_1a13659357368fa3c581b398d25af75bb4" class="ref">mprLookupModule</a>, <a href="#mpr_8h_1a8c28ede486e5dcb6e915d9bdf9b13b71" class="ref">mprLookupModuleData</a>, <a href="#mpr_8h_1a702d78826b619870746315bf551ad44c" class="ref">mprSearchForModule</a>, <a href="#mpr_8h_1a5432257cb103fefa67fd46e33a0e5917" class="ref">mprSetModuleFinalizer</a>, <a href="#mpr_8h_1a43d50c6e385a3592778d00c1dc53a8e7" class="ref">mprSetModuleSearchPath</a>, <a href="#mpr_8h_1a2db0b5b247179376ef476fa5ed05809a" class="ref">mprSetModuleTimeout</a>, <a href="#mpr_8h_1ada93a8c2366fe16efc767791d81793bd" class="ref">mprStartModule</a>, <a href="#mpr_8h_1aa07f1efa0d8eb9f8cfe00749a2a8518f" class="ref">mprStopModule</a>, <a href="#mpr_8h_1a4174cbe5ab086ed09c6669969683bba9" class="ref">mprUnloadModule</a>, <a href="#mpr_8h_1adb54bcae3a174efcde1c0ea3c6f8a565" class="ref">mprUnloadNativeModule</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="struct_mpr_module_service"></a>
<div class="api">
  <div class="prototype">MprModuleService</div>
  <div class="apiDetail">
<p>Loadable module service.</p>
    <dl><dt>See Also:</dt><dd>
    <a href="#mpr_8h_1a5b4d1daf88d69ef0609140ba1245e333" class="ref">mprCreateModuleService</a>, <a href="#mpr_8h_1a1e4dcdd954efac9c65c5c462c24967be" class="ref">mprStartModuleService</a>, <a href="#mpr_8h_1a6284c58e5740cea74f8c072d53d2cd8d" class="ref">mprStopModuleService</a></dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param"><a class="ref" href="#struct_mpr_list">MprList</a> *</td><td>modules</td><td>
List of defined modules.
</td></tr>
<tr><td class="param">char *</td><td>searchPath</td><td>
Module search path to locate modules.
</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="struct_mpr_mutex"></a>
<div class="api">
  <div class="prototype">MprMutex</div>
  <div class="apiDetail">
<p>Multithreading lock control structure.</p>
    <dl><dt><b>Description</b>:</dt><dd><a class="ref" href="#struct_mpr_mutex">MprMutex</a> is used for multithread locking in multithreaded applications.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="struct_mpr_path"></a>
<div class="api">
  <div class="prototype">MprPath</div>
  <div class="apiDetail">
<p>Path (filename) Information.</p>
    <dl><dt><b>Description</b>:</dt><dd><a class="ref" href="#struct_mpr_path">MprPath</a> is the cross platform Path (filename) information structure.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param"><a class="ref" href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c">MprTime</a></td><td>atime</td><td>
Access time.
</td></tr>
<tr><td class="param">bool</td><td>caseMatters</td><td>
Case comparisons matter.
</td></tr>
<tr><td class="param">bool</td><td>checked</td><td>
Path has been checked.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c">MprTime</a></td><td>ctime</td><td>
Create time.
</td></tr>
<tr><td class="param">int</td><td>group</td><td>
Group ID.
</td></tr>
<tr><td class="param">int64</td><td>inode</td><td>
Inode number.
</td></tr>
<tr><td class="param">bool</td><td>isDir</td><td>
Set if directory.
</td></tr>
<tr><td class="param">bool</td><td>isLink</td><td>
Set if a symbolic link <br/>
</td></tr>
<tr><td class="param">bool</td><td>isReg</td><td>
Set if a regular file.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c">MprTime</a></td><td>mtime</td><td>
Modified time.
</td></tr>
<tr><td class="param">int</td><td>owner</td><td>
Owner ID.
</td></tr>
<tr><td class="param">int</td><td>perms</td><td>
Permission mask.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1a87e9f435008723c7b1489af1944c6e20">MprOff</a></td><td>size</td><td>
File length.
</td></tr>
<tr><td class="param">bool</td><td>valid</td><td>
Valid data bit.
</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#struct_mpr_dir_entry" class="ref">MprDirEntry</a>, <a href="#struct_mpr_file" class="ref">MprFile</a>, <a href="#mpr_8h_1a358d2532cd4fe229f4118ca181b4b721" class="ref">mprCopyPath</a>, <a href="#mpr_8h_1a411af02ac646daeb80cd31eb54606976" class="ref">mprDeletePath</a>, <a href="#mpr_8h_1a080fbccb95ae7cf32175d3218b903389" class="ref">mprGetAbsPath</a>, <a href="#mpr_8h_1ab907f78a9b83d696751f6cbb61166e22" class="ref">mprGetCurrentPath</a>, <a href="#mpr_8h_1a52796d1fca3bdd2ff93a0641d5ce4ea4" class="ref">mprGetFirstPathSeparator</a>, <a href="#mpr_8h_1a329900c5d80145667270dbe8e471b011" class="ref">mprGetNativePath</a>, <a href="#mpr_8h_1af232054aa297f7ea84ae264e0b83515b" class="ref">mprGetPathBase</a>, <a href="#mpr_8h_1affd0f4d195e44639ac6b8c9bd00461c3" class="ref">mprGetPathDir</a>, <a href="#mpr_8h_1a07de4b4d95059c9eb10ff633eef853ea" class="ref">mprGetPathExt</a>, <a href="#mpr_8h_1aa863da10f93cc4c1d06a06f31c54b951" class="ref">mprGetPathFiles</a>, <a href="#mpr_8h_1ab7d843a3c7f004e28658affd89c8fa98" class="ref">mprGetPathLink</a>, <a href="#mpr_8h_1aa9117a09f9d5a4e6a18c2a502041fbe6" class="ref">mprGetPathNewline</a>, <a href="#mpr_8h_1a758289f4a0141c6f8ba27b006212a6a5" class="ref">mprGetPathParent</a>, <a href="#mpr_8h_1ac7dcdab739f1ee13fb3297b8740f414b" class="ref">mprGetPathSeparators</a>, <a href="#mpr_8h_1a64dec3a10cd155f04934f878cb41b17c" class="ref">mprGetPortablePath</a>, <a href="#mpr_8h_1aaeacafb118493798f314f974ba3f6a53" class="ref">mprGetRelPath</a>, <a href="#mpr_8h_1a5542317815cb01ecacfd65d9d8ead638" class="ref">mprGetTempPath</a>, <a href="#mpr_8h_1adf4522a53e12aed99b2de90642514ff8" class="ref">mprGetWinPath</a>, <a href="#mpr_8h_1a2049719abeb04bb8cc89e89dbc8ad4aa" class="ref">mprIsPathAbs</a>, <a href="#mpr_8h_1acdda62c3b86f55ac5fb8aeb7577e793a" class="ref">mprJoinPath</a>, <a href="#mpr_8h_1af830a34e57be320edb599e4b531d74da" class="ref">mprJoinPathExt</a>, <a href="#mpr_8h_1a762f62a5d048a067087092f7f783cad8" class="ref">mprJoinPaths</a>, <a href="#mpr_8h_1a8b825c9125a21012024b9b76f2683edb" class="ref">mprMakeDir</a>, <a href="#mpr_8h_1ab87f107b898264faed9e921d6a3669e3" class="ref">mprMakeLink</a>, <a href="#mpr_8h_1ab9be6174f5d4126e39a9380c0386e6a4" class="ref">mprMapSeparators</a>, <a href="#mpr_8h_1a5c43b80274f98cb355a25b1cefcc93df" class="ref">mprNormalizePath</a>, <a href="#mpr_8h_1adbed992189919b8d40b5008ee54a0ccb" class="ref">mprPathExists</a>, <a href="#mpr_8h_1a34487f0a0ccc42698ec93d73d3c880f1" class="ref">mprReplacePathExt</a>, <a href="#mpr_8h_1a5cae743a4ae7f3b84630581282358160" class="ref">mprResolvePath</a>, <a href="#mpr_8h_1a05f5c0032fd356cf18c2580ffb37be4d" class="ref">mprSamePath</a>, <a href="#mpr_8h_1aefab5559ec726c9e2d08e20211177249" class="ref">mprSamePathCount</a>, <a href="#mpr_8h_1a2294ad095d30050d31289b2b722f8f9a" class="ref">mprSearchPath</a>, <a href="#mpr_8h_1a5d538da0c5cff7c4496331fe377fec65" class="ref">mprTransformPath</a>, <a href="#mpr_8h_1acc54c392eac933777fd6871d6e26a195" class="ref">mprTrimPathExt</a></dd></dl>
  </div>
</div>
<a name="struct_mpr_region"></a>
<div class="api">
  <div class="prototype">MprRegion</div>
  <div class="apiDetail">
<p>Memmory regions allocated from the O/S.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param"><a class="ref" href="#struct_mpr_mem">MprMem</a> *</td><td>end</td><td>
End of region data.
</td></tr>
<tr><td class="param">int</td><td>freeable</td><td>
Set to true when completely unused.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_region">MprRegion</a> *</td><td>next</td><td>
Next region.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1a1600235df88b3821764244933b5024f5">size_t</a></td><td>size</td><td>
Size of region including region header.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_mem">MprMem</a> *</td><td>start</td><td>
Start of region data.
</td></tr>
    </table></dd></dl>
  </div>
</div>
<a name="struct_mpr_rom_inode"></a>
<div class="api">
  <div class="prototype">MprRomInode</div>
  <div class="apiDetail">
<p>A RomInode is created for each file in the Rom file system.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">uchar *</td><td>data</td><td>
Pointer to file data (unmanaged).
</td></tr>
<tr><td class="param">int</td><td>num</td><td>
Inode number.
</td></tr>
<tr><td class="param">char *</td><td>path</td><td>
File path.
</td></tr>
<tr><td class="param">int</td><td>size</td><td>
Size of file.
</td></tr>
    </table></dd></dl>
  </div>
</div>
<a name="struct_mpr_signal"></a>
<div class="api">
  <div class="prototype">MprSignal</div>
  <div class="apiDetail">
<p>Signal control structure.</p>
    <dl><dt>See Also:</dt><dd>
    <a href="#mpr_8h_1ac4a10702a0dc44988261064f0ec18dd8" class="ref">MprSignalProc</a>, <a href="#struct_mpr_signal_service" class="ref">MprSignalService</a>, <a href="#mpr_8h_1af41c40264929d075b340fc328165aca4" class="ref">mprAddSignalHandler</a>, <a href="#mpr_8h_1a22299171461b47afdd349666b0c0b996" class="ref">mprAddStandardSignals</a></dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">void *</td><td>data</td><td>
Handler data.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_dispatcher">MprDispatcher</a> *</td><td>dispatcher</td><td>
Dispatcher to service handler.
</td></tr>
<tr><td class="param">int</td><td>flags</td><td>
Control flags.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1ac4a10702a0dc44988261064f0ec18dd8">MprSignalProc</a></td><td>handler</td><td>
Signal handler (non-native).
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_signal">MprSignal</a> *</td><td>next</td><td>
Chain of handlers on the same signo.
</td></tr>
<tr><td class="param">void(*</td><td>sigaction) (int, siginfo_t *, void *)</td><td>
Prior sigaction handler.
</td></tr>
<tr><td class="param">int</td><td>signo</td><td>
Signal number.
</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="struct_mpr_signal_info"></a>
<div class="api">
  <div class="prototype">MprSignalInfo</div>
  <div class="apiDetail">
<p>Per signal structure.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">int</td><td>triggered</td><td>
Set to true when triggered.
</td></tr>
    </table></dd></dl>
  </div>
</div>
<a name="struct_mpr_signal_service"></a>
<div class="api">
  <div class="prototype">MprSignalService</div>
  <div class="apiDetail">
<p>Signal service control.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">int</td><td>hasSignals</td><td>
Signal sent to process.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_signal_info">MprSignalInfo</a></td><td>info[MPR_MAX_SIGNALS]</td><td>
Actual signal info and arg.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_mutex">MprMutex</a> *</td><td>mutex</td><td>
Multithread sync.
</td></tr>
<tr><td class="param">struct sigaction</td><td>prior[MPR_MAX_SIGNALS]</td><td>
Prior sigaction handler before hooking.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_signal">MprSignal</a> **</td><td>signals</td><td>
Signal handlers.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_list">MprList</a> *</td><td>standard</td><td>
Standard signal handlers.
</td></tr>
    </table></dd></dl>
  </div>
</div>
<a name="struct_mpr_socket"></a>
<div class="api">
  <div class="prototype">MprSocket</div>
  <div class="apiDetail">
<p>Socket Service.</p>
    <dl><dt><b>Description</b>:</dt><dd>The MPR Socket service provides IPv4 and IPv6 capabilities for both client and server endpoints. Datagrams, Broadcast and point to point services are supported. The APIs can be used in both blocking and non-blocking modes. <br/><br/>
The socket service integrates with the MPR worker thread pool and eventing services. Socket connections can be handled by threads from the worker thread pool for scalable, multithreaded applications.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">char *</td><td>acceptIp</td><td>
Server address that accepted a new connection (actual interface).
</td></tr>
<tr><td class="param">int</td><td>acceptPort</td><td>
Server port doing the listening.
</td></tr>
<tr><td class="param">cchar *</td><td>cipher</td><td>
Selected SSL cipher.
</td></tr>
<tr><td class="param">void *</td><td>data</td><td>
Custom user data (unmanaged).
</td></tr>
<tr><td class="param">char *</td><td>errorMsg</td><td>
Connection related error messages.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1af9381320a2640ea84038579d8f143c01">Socket</a></td><td>fd</td><td>
Actual socket file handle.
</td></tr>
<tr><td class="param">int</td><td>flags</td><td>
Current state flags.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_wait_handler">MprWaitHandler</a> *</td><td>handler</td><td>
Wait handler.
</td></tr>
<tr><td class="param">char *</td><td>ip</td><td>
Server listen address or remote client address.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_socket">MprSocket</a> *</td><td>listenSock</td><td>
Listening socket.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_mutex">MprMutex</a> *</td><td>mutex</td><td>
Multi-thread sync.
</td></tr>
<tr><td class="param">cchar *</td><td>peerCert</td><td>
Peer SSL certificate.
</td></tr>
<tr><td class="param">cchar *</td><td>peerCertIssuer</td><td>
Issuer of peer certificate.
</td></tr>
<tr><td class="param">cchar *</td><td>peerName</td><td>
Peer common SSL name.
</td></tr>
<tr><td class="param">int</td><td>port</td><td>
Port to listen or connect on.
</td></tr>
<tr><td class="param">cchar *</td><td>protocol</td><td>
Selected SSL protocol.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_socket_provider">MprSocketProvider</a> *</td><td>provider</td><td>
Socket implementation provider.
</td></tr>
<tr><td class="param">bool</td><td>secured</td><td>
SSL Peer verified.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_socket_service">MprSocketService</a> *</td><td>service</td><td>
Socket service.
</td></tr>
<tr><td class="param">cchar *</td><td>session</td><td>
SSL session ID (dependent on SSL provider).
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_ssl">MprSsl</a> *</td><td>ssl</td><td>
Selected SSL configuration.
</td></tr>
<tr><td class="param">void *</td><td>sslSocket</td><td>
Extended SSL socket state.
</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#mpr_8h_1a3105b7eaf43b2c002e520aa4a870fdee" class="ref">MprSocketPrebind</a>, <a href="#mpr_8h_1ac7bad8a3b219b43b6b3be36c7ff25d2c" class="ref">MprSocketProc</a>, <a href="#struct_mpr_socket_provider" class="ref">MprSocketProvider</a>, <a href="#struct_mpr_socket_service" class="ref">MprSocketService</a>, <a href="#mpr_8h_1a80b7c4b8dc7eeac71df1230b8c5eff67" class="ref">mprAddSocketHandler</a>, <a href="#mpr_8h_1a2fd29640fe5c0d10b45ba8e7fbba5bc2" class="ref">mprCloneSsl</a>, <a href="#mpr_8h_1a5bd6e40cb8a29c92a8f5e1ce9529b726" class="ref">mprCloseSocket</a>, <a href="#mpr_8h_1a7157efc602b90ef7786eb89d31ffa6f7" class="ref">mprConnectSocket</a>, <a href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0" class="ref">mprCreateSocket</a>, <a href="#mpr_8h_1af8c1ae4171f8591e9ca89eb02aeedaa8" class="ref">mprCreateSsl</a>, <a href="#mpr_8h_1a5f9301dbcddf9d1a62b40c69bc67fe40" class="ref">mprDisconnectSocket</a>, <a href="#mpr_8h_1a76ee7ac0bfb59b23680a835d7ac03854" class="ref">mprEnableSocketEvents</a>, <a href="#mpr_8h_1acd099834cea11479ab5a5ef542bfcaac" class="ref">mprFlushSocket</a>, <a href="#mpr_8h_1a8240b2dc5540ae928d19410447c2bab0" class="ref">mprGetSocketBlockingMode</a>, <a href="#mpr_8h_1a64ccf4250b432690a73bb66f0a639f7a" class="ref">mprGetSocketError</a>, <a href="#mpr_8h_1a73b28695884ae2db990efa68ae9213ca" class="ref">mprGetSocketHandle</a>, <a href="#mpr_8h_1a0cb09a106e793b09eebbedceaab7f85c" class="ref">mprGetSocketInfo</a>, <a href="#mpr_8h_1aa4d2f67f80f168a4be7e5f3b96541bab" class="ref">mprGetSocketPort</a>, <a href="#mpr_8h_1a27422f971a6b87d52c4c858dcf74fc68" class="ref">mprGetSocketState</a>, <a href="#mpr_8h_1abcaf311da2303180d2fb24c35c629580" class="ref">mprHasSecureSockets</a>, <a href="#mpr_8h_1a122966f272c5d7d00bab8f66d569d362" class="ref">mprIsSocketEof</a>, <a href="#mpr_8h_1abeeb5c489632e55d36e2139f8ac0f423" class="ref">mprIsSocketSecure</a>, <a href="#mpr_8h_1a03b1900a4646dcac3b07cb9269ec549a" class="ref">mprListenOnSocket</a>, <a href="#mpr_8h_1adbe4b5a9c6fbb78223f9d801e3d94bb2" class="ref">mprLoadSsl</a>, <a href="#mpr_8h_1aac9abd36a2e632460428af4d512ab2d0" class="ref">mprReadSocket</a>, <a href="#mpr_8h_1ae2baa591f0466c9c64f0cf0147ada904" class="ref">mprSetSocketBlockingMode</a>, <a href="#mpr_8h_1a27866b4c10d6e45ffd96604b221cf314" class="ref">mprSetSocketEof</a>, <a href="#mpr_8h_1a51594bafaa2003511990ffd804189a31" class="ref">mprSetSocketNoDelay</a>, <a href="#mpr_8h_1a472960cd4ec2360bf05ab678e7cba577" class="ref">mprSetSslCaFile</a>, <a href="#mpr_8h_1aadf254e5df954326a3f9bcd61e6a106b" class="ref">mprSetSslCaPath</a>, <a href="#mpr_8h_1a0eb821dce1b17ce08d83fa63b3ece658" class="ref">mprSetSslCertFile</a>, <a href="#mpr_8h_1af3d90b0a59c1e786421e8f2c2167fa20" class="ref">mprSetSslCiphers</a>, <a href="#mpr_8h_1aa8293be1a1b769f03db306834ef5291f" class="ref">mprSetSslKeyFile</a>, <a href="#mpr_8h_1a1a937447e0d16a18c8c4fd61df568d59" class="ref">mprSocketHandshaking</a>, <a href="#mpr_8h_1a3083d9605d116fa97f48d7941da8648e" class="ref">mprSocketHasBufferedRead</a>, <a href="#mpr_8h_1a23bc7f651617f75a71ba39686db02f47" class="ref">mprSocketHasBufferedWrite</a>, <a href="#mpr_8h_1a12b7f81e6e807d025f0de76f27d9f54e" class="ref">mprUpgradeSocket</a>, <a href="#mpr_8h_1a125e30fab937791fc0c807461bf3c797" class="ref">mprWriteSocket</a>, <a href="#mpr_8h_1af9a6fe73adb4fb12fb998bf218b2ac61" class="ref">mprWriteSocketString</a>, <a href="#mpr_8h_1a793fae1ef308f441f521dedadd9c5d4a" class="ref">mprWriteSocketVector</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="struct_mpr_socket_provider"></a>
<div class="api">
  <div class="prototype">MprSocketProvider</div>
  <div class="apiDetail">
<p>Socket service provider interface.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">void(*</td><td>closeSocket) (struct MprSocket *socket, bool graceful)</td><td>
Close a socket. 
<simplesect kind="par"><b>Description</b>:Close a socket. If the graceful option is true, the socket will first wait for written data to drain before doing a graceful close. </simplesect><parameterlist kind="param"><parameteritem><parameternamelist><parametername>socket</parametername></parameternamelist><parameterdescription>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></parameterdescription></parameteritem><parameteritem><parameternamelist><parametername>graceful</parametername></parameternamelist><parameterdescription>Set to true to do a graceful close. Otherwise, an abortive close will be performed. </parameterdescription></parameteritem></parameterlist><simplesect kind="par"><b>API</b> Stability:Stable </simplesect>
</td></tr>
<tr><td class="param">void *</td><td>data</td><td>
Socket provider private data (unmanaged).
</td></tr>
<tr><td class="param">void(*</td><td>disconnectSocket) (struct MprSocket *socket)</td><td>
Disconnect a socket by closing its underlying file descriptor. 
This is used to prevent further I/O wait events while still preserving the socket object. <parameterlist kind="param"><parameteritem><parameternamelist><parametername>socket</parametername></parameternamelist><parameterdescription>Socket object </parameterdescription></parameteritem></parameterlist><simplesect kind="par"><b>API</b> Stability:Stable </simplesect>
</td></tr>
<tr><td class="param">ssize(*</td><td>flushSocket) (struct MprSocket *socket)</td><td>
Flush a socket. 
<simplesect kind="par"><b>Description</b>:Flush any buffered data in a socket. Standard sockets do not use buffering and this call will do nothing. SSL sockets do buffer and calling mprFlushSocket will write pending written data. </simplesect><parameterlist kind="param"><parameteritem><parameternamelist><parametername>socket</parametername></parameternamelist><parameterdescription>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></parameterdescription></parameteritem></parameterlist><simplesect kind="return">A count of bytes actually written. Return a negative MPR error code on errors. </simplesect><simplesect kind="par"><b>API</b> Stability:Stable </simplesect>
</td></tr>
<tr><td class="param">void *</td><td>managed</td><td>
Socket provider private data managed.
</td></tr>
<tr><td class="param">char *</td><td>name</td><td>
Socket provider name.
</td></tr>
<tr><td class="param">int(*</td><td>preload) (struct MprSsl *ssl, int flags)</td><td>
Preload SSL configuration. 
<parameterlist kind="param"><parameteritem><parameternamelist><parametername>ssl</parametername></parameternamelist><parameterdescription>SSL configurations to use. </parameterdescription></parameteritem><parameteritem><parameternamelist><parametername>flags</parametername></parameternamelist><parameterdescription>Set to MPR_SOCKET_SERVER for server side use. </parameterdescription></parameteritem></parameterlist><simplesect kind="return">Zero if successful, otherwise a negative MPR error code. </simplesect><simplesect kind="par"><b>API</b> Stability:Stable </simplesect>
</td></tr>
<tr><td class="param">ssize(*</td><td>readSocket) (struct MprSocket *socket, void *buf, ssize size)</td><td>
Read from a socket. 
<simplesect kind="par"><b>Description</b>:Read data from a socket. The read will return with whatever bytes are available. If none and the socket is in blocking mode, it will block untill there is some data available or the socket is disconnected. </simplesect><parameterlist kind="param"><parameteritem><parameternamelist><parametername>socket</parametername></parameternamelist><parameterdescription>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></parameterdescription></parameteritem><parameteritem><parameternamelist><parametername>buf</parametername></parameternamelist><parameterdescription>Pointer to a buffer to hold the read data. </parameterdescription></parameteritem><parameteritem><parameternamelist><parametername>size</parametername></parameternamelist><parameterdescription>Size of the buffer. </parameterdescription></parameteritem></parameterlist><simplesect kind="return">A count of bytes actually read. Return a negative MPR error code on errors. </simplesect><simplesect kind="return">Return -1 for EOF and errors. On success, return the number of bytes read. Use mprIsSocketEof to distinguision between EOF and errors. </simplesect><simplesect kind="par"><b>API</b> Stability:Stable </simplesect>
</td></tr>
<tr><td class="param">char *(*</td><td>socketState) (struct MprSocket *socket)</td><td>
Get the socket state. 
<simplesect kind="par"><b>Description</b>:Get the socket state as a parseable string description </simplesect><parameterlist kind="param"><parameteritem><parameternamelist><parametername>sp</parametername></parameternamelist><parameterdescription>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></parameterdescription></parameteritem></parameterlist><simplesect kind="return">The an allocated string </simplesect><simplesect kind="par"><b>API</b> Stability:Stable </simplesect>
</td></tr>
<tr><td class="param">int(*</td><td>upgradeSocket) (struct MprSocket *socket, struct MprSsl *ssl, cchar *peerName)</td><td>
Upgrade a socket to use SSL/TLS. 
<parameterlist kind="param"><parameteritem><parameternamelist><parametername>sp</parametername></parameternamelist><parameterdescription>Socket to upgrade </parameterdescription></parameteritem><parameteritem><parameternamelist><parametername>ssl</parametername></parameternamelist><parameterdescription>SSL configurations to use. Set to NULL to use the default. </parameterdescription></parameteritem><parameteritem><parameternamelist><parametername>peerName</parametername></parameternamelist><parameterdescription>Required peer name in handshake with peer. Used by clients to verify the server hostname. </parameterdescription></parameteritem></parameterlist><simplesect kind="return">Zero if successful, otherwise a negative MPR error code. </simplesect><simplesect kind="par"><b>API</b> Stability:Stable </simplesect>
</td></tr>
<tr><td class="param">ssize(*</td><td>writeSocket) (struct MprSocket *socket, cvoid *buf, ssize size)</td><td>
Write to a socket. 
<simplesect kind="par"><b>Description</b>:Write a block of data to a socket. If the socket is in non-blocking mode (the default), the write may return having written less than the required bytes. </simplesect><parameterlist kind="param"><parameteritem><parameternamelist><parametername>socket</parametername></parameternamelist><parameterdescription>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></parameterdescription></parameteritem><parameteritem><parameternamelist><parametername>buf</parametername></parameternamelist><parameterdescription>Reference to a block to write to the socket </parameterdescription></parameteritem><parameteritem><parameternamelist><parametername>size</parametername></parameternamelist><parameterdescription>Length of data to write. This may be less than the requested write length if the socket is in non-blocking mode. Will return a negative MPR error code on errors. </parameterdescription></parameteritem></parameterlist><simplesect kind="return">A count of bytes actually written. Return a negative MPR error code on errors. </simplesect><simplesect kind="par"><b>API</b> Stability:Stable </simplesect>
</td></tr>
    </table></dd></dl>
  </div>
</div>
<a name="struct_mpr_socket_service"></a>
<div class="api">
  <div class="prototype">MprSocketService</div>
  <div class="apiDetail">
<p><a class="ref" href="#struct_mpr">Mpr</a> socket service class.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">int</td><td>hasIPv6</td><td>
System has supoprt for IPv6.
</td></tr>
<tr><td class="param">int</td><td>loaded</td><td>
Provider loaded.
</td></tr>
<tr><td class="param">int</td><td>maxAccept</td><td>
Maximum number of accepted client socket connections.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_mutex">MprMutex</a> *</td><td>mutex</td><td>
Multithread locking.
</td></tr>
<tr><td class="param">int</td><td>numAccept</td><td>
Count of client socket connections.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1a3105b7eaf43b2c002e520aa4a870fdee">MprSocketPrebind</a></td><td>prebind</td><td>
Prebind callback.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_socket_provider">MprSocketProvider</a> *</td><td>sslProvider</td><td>
Socket provider for SSL connections.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_socket_provider">MprSocketProvider</a> *</td><td>standardProvider</td><td>
Socket provider for non-SSL connections.
</td></tr>
    </table></dd></dl>
  </div>
</div>
<a name="struct_mpr_spin"></a>
<div class="api">
  <div class="prototype">MprSpin</div>
  <div class="apiDetail">
<p>Multithreading spin lock control structure.</p>
    <dl><dt><b>Description</b>:</dt><dd><a class="ref" href="#struct_mpr_spin">MprSpin</a> is used for multithread locking in multithreaded applications.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="struct_mpr_ssl"></a>
<div class="api">
  <div class="prototype">MprSsl</div>
  <div class="apiDetail">
<p>SSL control structure.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param"><a class="ref" href="#struct_mpr_list">MprList</a> *</td><td>alpn</td><td>
ALPN protocols.
</td></tr>
<tr><td class="param">cchar *</td><td>caFile</td><td>
Certificate verification cert file or bundle.
</td></tr>
<tr><td class="param">cchar *</td><td>caPath</td><td>
Certificate verification cert directory (OpenSSL only).
</td></tr>
<tr><td class="param">cchar *</td><td>certFile</td><td>
Certificate filename.
</td></tr>
<tr><td class="param">bool</td><td>changed</td><td>
Set if there is a change in the SSL config. 
Reset by providers.
</td></tr>
<tr><td class="param">cchar *</td><td>ciphers</td><td>
Candidate ciphers to use.
</td></tr>
<tr><td class="param">void *</td><td>config</td><td>
Extended provider SSL configuration.
</td></tr>
<tr><td class="param">bool</td><td>configured</td><td>
Set if this SSL configuration has been processed.
</td></tr>
<tr><td class="param">cchar *</td><td>device</td><td>
Crypto hardware device to use.
</td></tr>
<tr><td class="param">cchar *</td><td>hostname</td><td>
Hostname when using SNI.
</td></tr>
<tr><td class="param">cchar *</td><td>keyFile</td><td>
Alternatively, locate the key in a file.
</td></tr>
<tr><td class="param">int</td><td>logLevel</td><td>
Level at which to start tracing SSL events.
</td></tr>
<tr><td class="param">MprMatchSsl</td><td>matchSsl</td><td>
Match the SSL configuration for SNI.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_mutex">MprMutex</a> *</td><td>mutex</td><td>
Multithread sync.
</td></tr>
<tr><td class="param">int</td><td>protocols</td><td>
SSL protocols.
</td></tr>
<tr><td class="param">bool</td><td>renegotiate</td><td>
Renegotiate sessions.
</td></tr>
<tr><td class="param">cchar *</td><td>revoke</td><td>
Certificate revocation list.
</td></tr>
<tr><td class="param">bool</td><td>ticket</td><td>
Enable session tickets.
</td></tr>
<tr><td class="param">bool</td><td>verified</td><td>
Peer has been verified.
</td></tr>
<tr><td class="param">int</td><td>verifyDepth</td><td>
Cert chain depth that should be verified.
</td></tr>
<tr><td class="param">bool</td><td>verifyIssuer</td><td>
Set if the certificate issuer should be also verified.
</td></tr>
<tr><td class="param">cchar *</td><td>verifyPeer</td><td>
Verify the peer certificate (none, optional, require).
</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="struct_mpr_string"></a>
<div class="api">
  <div class="prototype">MprString</div>
  <div class="apiDetail">
<p>Safe String Module.</p>
    <dl><dt><b>Description</b>:</dt><dd>The MPR provides a suite of safe ascii string manipulation routines to help prevent buffer overflows and other potential security traps.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
    </table></dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#mpr_8h_1ac9965b367cc103b9ae701b08110180b2" class="ref">fmt</a>, <a href="#mpr_8h_1a057c5cdc238153c4f9c0c3b1ce7dbd25" class="ref">fmtv</a>, <a href="#mpr_8h_1acb2fb0ada13ab5df81837faa4f8f45b8" class="ref">itos</a>, <a href="#mpr_8h_1a09d77f66f305e34c9d8f38d0f108a9b0" class="ref">itosbuf</a>, <a href="#mpr_8h_1a8134ad4cbe9efa965155df9ca8bb29bf" class="ref">itosradix</a>, <a href="#mpr_8h_1a97cfa9d651a30ee3699b050b4a3644e0" class="ref">mprEprintf</a>, <a href="#mpr_8h_1ac291f492ca21c6576cf5cfcb1662f0c2" class="ref">mprFprintf</a>, <a href="#mpr_8h_1ab80b8013c78bb488b6f578cd48702259" class="ref">mprPrintf</a>, <a href="#mpr_8h_1ab7d638edc4b0a18b2116b344b06b47b5" class="ref">scamel</a>, <a href="#mpr_8h_1af9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#mpr_8h_1a021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#mpr_8h_1ad15a2ce6c7fdb207c3ad26e7bc60cb19" class="ref">schr</a>, <a href="#mpr_8h_1acb666da0fc979829bdfa3805d30690b8" class="ref">sclone</a>, <a href="#mpr_8h_1a130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#mpr_8h_1a0c956f14f59854ad852e186a5691fd17" class="ref">scontains</a>, <a href="#mpr_8h_1a96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#mpr_8h_1a9bda617838d96d3e987c81c20616263f" class="ref">sends</a>, <a href="#mpr_8h_1aca549ba73a2f8c4fe20ec62874028c2a" class="ref">sfmt</a>, <a href="#mpr_8h_1aeafcc9222db8944b862cbb73aef6039a" class="ref">sfmtv</a>, <a href="#mpr_8h_1a28eb81d75667d4866e1cf05c0ae5d3c5" class="ref">shash</a>, <a href="#mpr_8h_1a0fa08b3d620074fc5959db864f0d448a" class="ref">shashlower</a>, <a href="#mpr_8h_1a9a07724da59f3ad7ffe2cfedf795468b" class="ref">sjoin</a>, <a href="#mpr_8h_1a3fa2c135b48b9c584173fd355ac0596b" class="ref">sjoinv</a>, <a href="#mpr_8h_1ade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#mpr_8h_1a790b3a7ef67d4d7125eb26a8de2448b4" class="ref">slower</a>, <a href="#mpr_8h_1abe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#mpr_8h_1a30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#mpr_8h_1a86e917f9fb726d0399bc0f977d500718" class="ref">snclone</a>, <a href="#mpr_8h_1a5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#mpr_8h_1a298af255a2884458c4fe46c3ee320a4b" class="ref">sncontains</a>, <a href="#mpr_8h_1a9e34c10326cd5ffd7a9865bb224960b0" class="ref">sncopy</a>, <a href="#mpr_8h_1a80f844ded2d7567f16d75bab67fd6fb1" class="ref">spbrk</a>, <a href="#mpr_8h_1a909f95ef7e493e05d6794a294f4066b7" class="ref">srchr</a>, <a href="#mpr_8h_1ad094f0c7906f4e953d0a06ea2dceb410" class="ref">srejoin</a>, <a href="#mpr_8h_1a97b7b27c2b7132a44e21f6a218ea037c" class="ref">srejoinv</a>, <a href="#mpr_8h_1a812228240ff7b596dd2caaac2b9c5a35" class="ref">sspn</a>, <a href="#mpr_8h_1a5eec22bfd3a58a8c344d30175849f2ee" class="ref">sstarts</a>, <a href="#mpr_8h_1a58b9dc0d8e314b0abc98de8739ee3756" class="ref">ssub</a>, <a href="#mpr_8h_1aeafb6bb78fe09355365967e317889593" class="ref">stemplate</a>, <a href="#mpr_8h_1aba79a15513be86f5951110d957da8173" class="ref">stemplateJson</a>, <a href="#mpr_8h_1a6cda5ecd6831c87de8afd3c99f266472" class="ref">stitle</a>, <a href="#mpr_8h_1ab24da0fe30b572a18321fa16e3dbfa19" class="ref">stoi</a>, <a href="#mpr_8h_1a851760bd4787be87c785d158892eaf82" class="ref">stoiradix</a>, <a href="#mpr_8h_1adbeb0bae6f0eaa147eaab42666cc5fb2" class="ref">stok</a>, <a href="#mpr_8h_1a75c783da24379c3ec2099f34d70dfd2c" class="ref">strim</a>, <a href="#mpr_8h_1a3a2a03da7c916044aa7d700a0f5dda48" class="ref">supper</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="struct_mpr_sync"></a>
<div class="api">
  <div class="prototype">MprSync</div>
  <div class="apiDetail">
<p>Multithreaded Synchronization Services.</p>
    <dl><dt>See Also:</dt><dd>
    <a href="#struct_mpr_cond" class="ref">MprCond</a>, <a href="#struct_mpr_mutex" class="ref">MprMutex</a>, <a href="#struct_mpr_spin" class="ref">MprSpin</a>, <a href="#mpr_8h_1af64ed09ca5470083fd11e73c9611b3f3" class="ref">mprAtomicAdd</a>, <a href="#mpr_8h_1a70c05a2808827f0f5881a1961c95290c" class="ref">mprAtomicAdd64</a>, <a href="#mpr_8h_1a37da6d7e22d7022da59b6e2930847afa" class="ref">mprAtomicBarrier</a>, <a href="#mpr_8h_1adfb5ebec7f3b7ce4922916dcc49a5749" class="ref">mprAtomicCas</a>, <a href="#mpr_8h_1a3f7604ac56fad55fbbb4cd38e742b8d1" class="ref">mprAtomicListInsert</a>, <a href="#mpr_8h_1a563cf7257bd5ed5d1024cd457bae598f" class="ref">mprCreateCond</a>, <a href="#mpr_8h_1a1c8cb9039500adccdfab41502d1b51f0" class="ref">mprCreateLock</a>, <a href="#mpr_8h_1a5c274c45a6ecaeb4fed542a9f74a6fc6" class="ref">mprCreateSpinLock</a>, <a href="#mpr_8h_1a393f36fdfba1bf0b17a7df289c1eae29" class="ref">mprGlobalLock</a>, <a href="#mpr_8h_1aeaf0a9ee6fe651307aa4c8d8061cdbd4" class="ref">mprGlobalUnlock</a>, <a href="#mpr_8h_1ac2c7afe9194b40008b0bfaf383ba7fce" class="ref">mprInitLock</a>, <a href="#mpr_8h_1aa98804877c521536f8b3be4e90e9016d" class="ref">mprInitSpinLock</a>, <a href="#mpr_8h_1ad193cb5549a1101dc17177f046144ede" class="ref">mprLock</a>, <a href="#mpr_8h_1a3db47bdecb58c2c52197d625377cf71b" class="ref">mprResetCond</a>, <a href="#mpr_8h_1ab014329886bcb9a8cb9b970afc30378b" class="ref">mprSignalCond</a>, <a href="#mpr_8h_1a9b20d1bf69e28579dd968c1c0daf976b" class="ref">mprSignalMultiCond</a>, <a href="#mpr_8h_1af2a84bc9cee343c8ebfc3bfa49751795" class="ref">mprSpinLock</a>, <a href="#mpr_8h_1aeb11c8a1f0c2c3f905967a932626121e" class="ref">mprSpinUnlock</a>, <a href="#mpr_8h_1a2b3b8e824b92499192ea48512e31c26d" class="ref">mprTryLock</a>, <a href="#mpr_8h_1ac257b932fcc7140852e6830640d2301b" class="ref">mprTrySpinLock</a>, <a href="#mpr_8h_1a40a516fe58b4b2998852cd0c853027ad" class="ref">mprUnlock</a>, <a href="#mpr_8h_1a2902c6005212638d289e867d567e16d7" class="ref">mprWaitForCond</a>, <a href="#mpr_8h_1a0b4bca5c7c7922fddc14e08213892289" class="ref">mprWaitForMultiCond</a></dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="struct_mpr_thread"></a>
<div class="api">
  <div class="prototype">MprThread</div>
  <div class="apiDetail">
<p>Thread Service.</p>
    <dl><dt><b>Description</b>:</dt><dd>The MPR provides a cross-platform thread abstraction above O/S native threads. It supports arbitrary thread creation, thread priorities, thread management and thread local storage. By using these thread primitives with the locking and synchronization primitives offered by <a class="ref" href="#struct_mpr_mutex">MprMutex</a>, <a class="ref" href="#struct_mpr_spin">MprSpin</a> and <a class="ref" href="#struct_mpr_cond">MprCond</a> - you can create cross platform multi-threaded applications.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param"><a class="ref" href="#struct_mpr_cond">MprCond</a> *</td><td>cond</td><td>
Multi-thread synchronization.
</td></tr>
<tr><td class="param">void *</td><td>data</td><td>
Data argument (managed).
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1a48c1189e15feb2e337536ab8f562284a">MprThreadProc</a></td><td>entry</td><td>
Users thread entry point.
</td></tr>
<tr><td class="param">bool</td><td>isMain</td><td>
Is the main thread.
</td></tr>
<tr><td class="param">bool</td><td>isWorker</td><td>
Is a worker thread.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_mutex">MprMutex</a> *</td><td>mutex</td><td>
Multi-thread locking.
</td></tr>
<tr><td class="param">char *</td><td>name</td><td>
Name of thead for trace.
</td></tr>
<tr><td class="param">bool</td><td>noyield</td><td>
Do not yield (temporary).
</td></tr>
<tr><td class="param">MprOsThread</td><td>osThread</td><td>
O/S thread id.
</td></tr>
<tr><td class="param">ulong</td><td>pid</td><td>
Owning process id.
</td></tr>
<tr><td class="param">int</td><td>priority</td><td>
Current priority.
</td></tr>
<tr><td class="param">ssize</td><td>stackSize</td><td>
Only VxWorks implements.
</td></tr>
<tr><td class="param">bool</td><td>stickyYield</td><td>
Yielded does not auto-clear after GC.
</td></tr>
<tr><td class="param">bool</td><td>waitForSweeper</td><td>
Yield untill the GC sweeper is complete.
</td></tr>
<tr><td class="param">bool</td><td>waiting</td><td>
Waiting in mprYield.
</td></tr>
<tr><td class="param">bool</td><td>yielded</td><td>
Thread has yielded to GC.
</td></tr>
    </table></dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#mpr_8h_1a48c1189e15feb2e337536ab8f562284a" class="ref">MprThreadProc</a>, <a href="#struct_mpr_thread_service" class="ref">MprThreadService</a>, <a href="#mpr_8h_1afad5f424b850bf2aa9f995f6c0a62fc1" class="ref">mprCreateThread</a>, <a href="#mpr_8h_1a9db7204c54785784352bb1ee492fadab" class="ref">mprGetCurrentOsThread</a>, <a href="#mpr_8h_1a9b441f06f8eae7eaebcba6d35bfa3a48" class="ref">mprGetCurrentThread</a>, <a href="#mpr_8h_1a3cba09b91b830934fbe9deee2be61f49" class="ref">mprGetCurrentThreadName</a>, <a href="#mpr_8h_1a62063a19df01cb0845f5365d390e13be" class="ref">mprGetThreadName</a>, <a href="#mpr_8h_1a525ba7359a573e4dee78703ea6ef93eb" class="ref">mprNeedYield</a>, <a href="#mpr_8h_1aa4bf0d2c9a7c854dcb9edc83035c84ba" class="ref">mprResetYield</a>, <a href="#mpr_8h_1a35c53df918c2f52e2e1f6961e35ee8d1" class="ref">mprStartThread</a>, <a href="#mpr_8h_1af140a2fda18b2e8461236cc44c0a2cc4" class="ref">mprYield</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="struct_mpr_thread_local"></a>
<div class="api">
  <div class="prototype">MprThreadLocal</div>
  <div class="apiDetail">
<p>Thread local data storage.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">pthread_key_t</td><td>key</td><td>
Data key.
</td></tr>
    </table></dd></dl>
  </div>
</div>
<a name="struct_mpr_thread_service"></a>
<div class="api">
  <div class="prototype">MprThreadService</div>
  <div class="apiDetail">
<p>Thread service.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">struct <a class="ref" href="#struct_mpr_thread">MprThread</a> *</td><td>eventsThread</td><td>
Event service thread.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_thread">MprThread</a> *</td><td>mainThread</td><td>
Main application thread.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_cond">MprCond</a> *</td><td>pauseThreads</td><td>
Waiting for threads to yield.
</td></tr>
<tr><td class="param">ssize</td><td>stackSize</td><td>
Default thread stack size.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_list">MprList</a> *</td><td>threads</td><td>
List of all threads.
</td></tr>
    </table></dd></dl>
  </div>
</div>
<a name="struct_mpr_wait_handler"></a>
<div class="api">
  <div class="prototype">MprWaitHandler</div>
  <div class="apiDetail">
<p>Wait Handler Service.</p>
    <dl><dt><b>Description</b>:</dt><dd>Wait handlers provide callbacks for when I/O events occur. They provide a wait to service many I/O file descriptors without requiring a thread per descriptor.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param"><a class="ref" href="#struct_mpr_cond">MprCond</a> *</td><td>callbackComplete</td><td>
Signalled when a callback is complete.
</td></tr>
<tr><td class="param">int</td><td>desiredMask</td><td>
Mask of desired events.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_dispatcher">MprDispatcher</a> *</td><td>dispatcher</td><td>
Event dispatcher to use for I/O events.
</td></tr>
<tr><td class="param">int</td><td>fd</td><td>
O/S File descriptor (sp-&gt;sock).
</td></tr>
<tr><td class="param">int</td><td>flags</td><td>
Control flags.
</td></tr>
<tr><td class="param">void *</td><td>handlerData</td><td>
Argument to pass to proc - managed reference.
</td></tr>
<tr><td class="param">int</td><td>notifierIndex</td><td>
Index for notifier.
</td></tr>
<tr><td class="param">int</td><td>presentMask</td><td>
Mask of current events.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1aca9cf0e331925f694232cd822ed70a56">MprEventProc</a></td><td>proc</td><td>
Callback event procedure.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_worker">MprWorker</a> *</td><td>requiredWorker</td><td>
Designate the required worker thread to run the callback.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_wait_service">MprWaitService</a> *</td><td>service</td><td>
Wait service pointer.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_thread">MprThread</a> *</td><td>thread</td><td>
Thread executing the callback, set even if worker is null.
</td></tr>
    </table></dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#struct_mpr_event" class="ref">MprEvent</a>, <a href="#mpr_8h_1a90c04576c4f4f15dee8b118f2e53ed63" class="ref">mprCreateWaitHandler</a>, <a href="#mpr_8h_1ae7af42e3a8ef70c3a9f6879b91e0697d" class="ref">mprDestroyWaitHandler</a>, <a href="#mpr_8h_1a52f88939c5c03270beff007574b4aeb0" class="ref">mprQueueIOEvent</a>, <a href="#mpr_8h_1a82f81798dcccf075cc6fc272a4abcffc" class="ref">mprRecallWaitHandler</a>, <a href="#mpr_8h_1ab449e3836233feee7490af3364437d15" class="ref">mprRecallWaitHandlerByFd</a>, <a href="#mpr_8h_1aa0e15d53ab8eab3472f5a170d4e3f27b" class="ref">mprWaitOn</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="struct_mpr_wait_service"></a>
<div class="api">
  <div class="prototype">MprWaitService</div>
  <div class="apiDetail">
<p>Wait Service.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
    </table></dd></dl>
  </div>
</div>
<a name="struct_mpr_worker"></a>
<div class="api">
  <div class="prototype">MprWorker</div>
  <div class="apiDetail">
<p>Worker thread structure.</p>
    <dl><dt>See Also:</dt><dd>
    <a href="#struct_mpr_worker_service" class="ref">MprWorkerService</a>, <a href="#struct_mpr_worker_stats" class="ref">MprWorkerStats</a>, <a href="#mpr_8h_1a7fe4c3fb94490eb462405d86f71514d7" class="ref">mprDedicateWorker</a>, <a href="#mpr_8h_1a14edad55ccffaf94ae988e36ac793675" class="ref">mprGetCurrentWorker</a>, <a href="#mpr_8h_1ae4ec7b83f3094b71025fe605a1bcf2dc" class="ref">mprGetMaxWorkers</a>, <a href="#mpr_8h_1adae3b874e39e0d5e0155d5179f1d83cc" class="ref">mprReleaseWorker</a>, <a href="#mpr_8h_1a9982a2441762d3a7f82c01c1c5be4476" class="ref">mprSetMaxWorkers</a>, <a href="#mpr_8h_1abb03b89f212e6a3fd8bc13e66927ab68" class="ref">mprSetMinWorkers</a>, <a href="#mpr_8h_1ad7721cca919f57f9b85434e6435ef092" class="ref">mprSetWorkerStackSize</a>, <a href="#mpr_8h_1aff85a5fec251ea6ce4c9f24532b93e11" class="ref">mprStartWorker</a></dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param"><a class="ref" href="#mpr_8h_1a6c2bc16deb84f2893c1935deb94bec29">MprWorkerProc</a></td><td>cleanup</td><td>
Procedure to cleanup after run before sleeping.
</td></tr>
<tr><td class="param">void *</td><td>data</td><td>
User per-worker data.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_cond">MprCond</a> *</td><td>idleCond</td><td>
Used to wait for work.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319">MprTicks</a></td><td>lastActivity</td><td>
When the worker was last used.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1a6c2bc16deb84f2893c1935deb94bec29">MprWorkerProc</a></td><td>proc</td><td>
Procedure to run.
</td></tr>
<tr><td class="param">int</td><td>running</td><td>
Worker running a job.
</td></tr>
<tr><td class="param">int</td><td>state</td><td>
Worker state.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_thread">MprThread</a> *</td><td>thread</td><td>
Thread associated with this worker.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_worker_service">MprWorkerService</a> *</td><td>workerService</td><td>
Worker service.
</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="struct_mpr_worker_service"></a>
<div class="api">
  <div class="prototype">MprWorkerService</div>
  <div class="apiDetail">
<p>Worker Thread Service.</p>
    <dl><dt><b>Description</b>:</dt><dd>The MPR provides a worker thread pool for rapid starting and assignment of threads to tasks.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param"><a class="ref" href="#struct_mpr_list">MprList</a> *</td><td>busyThreads</td><td>
List of threads to service tasks.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_list">MprList</a> *</td><td>idleThreads</td><td>
List of threads to service tasks.
</td></tr>
<tr><td class="param">int</td><td>maxThreads</td><td>
Max # threads in worker pool.
</td></tr>
<tr><td class="param">int</td><td>maxUsedThreads</td><td>
Max threads ever used.
</td></tr>
<tr><td class="param">int</td><td>minThreads</td><td>
Max # threads in worker pool.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_mutex">MprMutex</a> *</td><td>mutex</td><td>
Per task synchronization.
</td></tr>
<tr><td class="param">int</td><td>nextThreadNum</td><td>
Unique next thread number.
</td></tr>
<tr><td class="param">int</td><td>numThreads</td><td>
Current number of threads in worker pool.
</td></tr>
<tr><td class="param">struct <a class="ref" href="#struct_mpr_event">MprEvent</a> *</td><td>pruneTimer</td><td>
Timer for excess threads pruner.
</td></tr>
<tr><td class="param">ssize</td><td>stackSize</td><td>
Stack size for worker threads.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1a6c2bc16deb84f2893c1935deb94bec29">MprWorkerProc</a></td><td>startWorker</td><td>
Worker thread startup hook.
</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="struct_mpr_worker_stats"></a>
<div class="api">
  <div class="prototype">MprWorkerStats</div>
  <div class="apiDetail">
<p>Statistics for Workers.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">int</td><td>busy</td><td>
Number of busy workers.
</td></tr>
<tr><td class="param">int</td><td>idle</td><td>
Number of idle workers.
</td></tr>
<tr><td class="param">int</td><td>max</td><td>
Configured max number of workers.
</td></tr>
<tr><td class="param">int</td><td>maxUsed</td><td>
Max number of workers ever used used.
</td></tr>
<tr><td class="param">int</td><td>min</td><td>
Configured minimum number of workers.
</td></tr>
<tr><td class="param">int</td><td>yielded</td><td>
Number of busy workers yielded for GC.
</td></tr>
    </table></dd></dl>
  </div>
</div>
<a name="struct_mpr_xml"></a>
<div class="api">
  <div class="prototype">MprXml</div>
  <div class="apiDetail">
<p>Per XML session structure.</p>
    <dl><dt>See Also:</dt><dd>
    <a href="#mpr_8h_1aa49d1c32fc1e641828bf8ffbcf675be6" class="ref">MprXmlHandler</a>, <a href="#mpr_8h_1ad7d3735f6e2ef85b57904b5cce3832a4" class="ref">MprXmlInputStream</a>, <a href="#mpr_8h_1a1f563ac13a665bd5b17f3c991ae60234" class="ref">mprXmlGetErrorMsg</a>, <a href="#mpr_8h_1a05338788d8a31a3305ec96890f1dfbde" class="ref">mprXmlGetLineNumber</a>, <a href="#mpr_8h_1a0db90fdc594feb1285964afdc0d69f87" class="ref">mprXmlGetParseArg</a>, <a href="#mpr_8h_1a72fb60525ced098d59ef7c79cd02b550" class="ref">mprXmlOpen</a>, <a href="#mpr_8h_1a1341ea482faf1301d867e71575ba638a" class="ref">mprXmlParse</a>, <a href="#mpr_8h_1a815cdc307b58663f2890711f60b690e3" class="ref">mprXmlSetParseArg</a></dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
<tr><td class="param">char *</td><td>errMsg</td><td>
Error message text.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1aa49d1c32fc1e641828bf8ffbcf675be6">MprXmlHandler</a></td><td>handler</td><td>
Callback function.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_buf">MprBuf</a> *</td><td>inBuf</td><td>
Input data queue.
</td></tr>
<tr><td class="param">void *</td><td>inputArg</td><td>
Arg for <a class="ref" href="#mpr_8h_1a61144d35daf0b10f9f62bbd14eb106af">mprXmlSetInputStream()</a>
</td></tr>
<tr><td class="param">int</td><td>lineNumber</td><td>
Current line no for debug.
</td></tr>
<tr><td class="param">void *</td><td>parseArg</td><td>
Arg passed to <a class="ref" href="#mpr_8h_1a1341ea482faf1301d867e71575ba638a">mprXmlParse()</a>
</td></tr>
<tr><td class="param">int</td><td>quoteChar</td><td>
XdbAtt quote char.
</td></tr>
<tr><td class="param"><a class="ref" href="#mpr_8h_1ad7d3735f6e2ef85b57904b5cce3832a4">MprXmlInputStream</a></td><td>readFn</td><td>
Read data function.
</td></tr>
<tr><td class="param"><a class="ref" href="#struct_mpr_buf">MprBuf</a> *</td><td>tokBuf</td><td>
Parsed token buffer.
</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<h2>Functions</h2>
<a name="mpr_8h_1a80adc8087f3a20a2669565b281d57a38"></a>
<div class="api">
  <div class="prototype">
    void
    assert
(<a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> cond)
  </div>
  <div class="apiDetail">
<p>Assert that a condition is true.</p>
    <dl><dt><b>Description</b>:</dt><dd>Assert that a condition is true. If the condition is false, the program will abort. This is used for debugging and testing purposes.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cond</td><td>Boolean result of a conditional test.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac9965b367cc103b9ae701b08110180b2"></a>
<div class="api">
  <div class="prototype">
    char *
    fmt
(char *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> maxSize, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
  </div>
  <div class="apiDetail">
<p>Format a string into a static buffer.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call format a string using printf style formatting arguments. A trailing null will always be appended. The call returns the size of the allocated string excluding the null.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Pointer to the buffer.</td></tr>
    <tr><td class="param">maxSize</td><td>Size of the buffer.</td></tr>
    <tr><td class="param">fmt</td><td>Printf style format string.</td></tr>
    <tr><td class="param">...</td><td>Variable arguments to format.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The buffer.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a057c5cdc238153c4f9c0c3b1ce7dbd25"></a>
<div class="api">
  <div class="prototype">
    char char *
    fmtv
(char *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> maxSize, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, va_list args)
  </div>
  <div class="apiDetail">
<p>Format a string into a statically allocated buffer.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call format a string using printf style formatting arguments. A trailing null will always be appended. The call returns the size of the allocated string excluding the null.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Pointer to the buffer.</td></tr>
    <tr><td class="param">maxSize</td><td>Size of the buffer.</td></tr>
    <tr><td class="param">fmt</td><td>Printf style format string.</td></tr>
    <tr><td class="param">args</td><td>Varargs argument obtained from va_start.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The buffer;.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1acb2fb0ada13ab5df81837faa4f8f45b8"></a>
<div class="api">
  <div class="prototype">
    char *
    itos
(<a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> value)
  </div>
  <div class="apiDetail">
<p>Convert an integer to a string.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call converts the supplied 64 bit integer to a string using base 10.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">value</td><td>Integer value to convert.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated string with the converted number.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a09d77f66f305e34c9d8f38d0f108a9b0"></a>
<div class="api">
  <div class="prototype">
    char *
    itosbuf
(char *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size, <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> value, int radix)
  </div>
  <div class="apiDetail">
<p>Convert an integer to a string buffer.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call converts the supplied 64 bit integer into a string formatted into the supplied buffer according to the specified radix.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Pointer to the buffer that will hold the string.</td></tr>
    <tr><td class="param">size</td><td>Size of the buffer.</td></tr>
    <tr><td class="param">value</td><td>Integer value to convert.</td></tr>
    <tr><td class="param">radix</td><td>The base radix to use when encoding the number.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a reference to the string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a8134ad4cbe9efa965155df9ca8bb29bf"></a>
<div class="api">
  <div class="prototype">
    char *
    itosradix
(<a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> value, int radix)
  </div>
  <div class="apiDetail">
<p>Convert an integer to a string.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call converts the supplied 64 bit integer to a string according to the specified radix.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">value</td><td>Integer value to convert.</td></tr>
    <tr><td class="param">radix</td><td>The base radix to use when encoding the number.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated string with the converted number.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a98a5078070502539018c68b030e7c416"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_socket" class="ref">MprSocket</a> *
    mprAcceptSocket
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *listen)
  </div>
  <div class="apiDetail">
<p>Accept an incoming connection.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">listen</td><td>Listening server socket.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A new socket connection. Windows can return NULL with error set to EAGAIN.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a2e4b46bada003ec29ed09e244fe89e50"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_key" class="ref">MprKey</a> *
    mprAddDuplicateKey
(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *key, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr)
  </div>
  <div class="apiDetail">
<p>Add a duplicate symbol value into the hash table.</p>
    <dl><dt><b>Description</b>:</dt><dd>Add a symbol to the hash which may clash with an existing entry. Duplicate symbols can be added to the hash, but only one may be retrieved via <a class="ref" href="#mpr_8h_1a5b3e1f1d4e80038ece3362c328c43820">mprLookupKey</a>. To recover duplicate entries walk the hash using <a class="ref" href="#mpr_8h_1a9644a249a4851fabce945c85c2a0965c">mprGetNextKey</a></dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">table</td><td>Symbol table returned via mprCreateHash.</td></tr>
    <tr><td class="param">key</td><td>String key of the symbol entry to delete.</td></tr>
    <tr><td class="param">ptr</td><td>Arbitrary pointer to associate with the key in the table.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Integer count of the number of entries.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aace8a812b003454accd5f45079b8dd24"></a>
<div class="api">
  <div class="prototype">
    void
    mprAddFileSystem
(<a href="#struct_mpr_file_system" class="ref">MprFileSystem</a> *fs)
  </div>
  <div class="apiDetail">
<p>Create and initialize the disk FileSystem.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is an internal routine called by the MPR during initialization.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">fs</td><td>File system object.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1abf10109abc063c47702769c0e89442cf"></a>
<div class="api">
  <div class="prototype">
    int
    mprAddItem
(<a href="#struct_mpr_list" class="ref">MprList</a> *list, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *item)
  </div>
  <div class="apiDetail">
<p>Add an item to a list.</p>
    <dl><dt><b>Description</b>:</dt><dd>Add the specified item to the list. The list must have been previously created via mprCreateList. The list will grow as required to store the item.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">list</td><td>List pointer returned from <a class="ref" href="#mpr_8h_1aad013e1bb3447a42920f013eceebf174">mprCreateList</a></td></tr>
    <tr><td class="param">item</td><td>Pointer to item to store.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a positive list index for the inserted item. If the item cannot be inserted due to a memory allocation failure, -1 is returned.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5160d52c756eb2c01ee97657c1a6f678"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_key" class="ref">MprKey</a> *
    mprAddKey
(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *key, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr)
  </div>
  <div class="apiDetail">
<p>Add a symbol value into the hash table.</p>
    <dl><dt><b>Description</b>:</dt><dd>Associate an arbitrary value with a string symbol key and insert into the symbol table. This will replace existing key values. Use mprAddDuplicateKey to allow duplicates.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">table</td><td>Symbol table returned via mprCreateHash.</td></tr>
    <tr><td class="param">key</td><td>String key of the symbol entry to delete.</td></tr>
    <tr><td class="param">ptr</td><td>Arbitrary pointer to associate with the key in the table.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Added <a class="ref" href="#struct_mpr_key">MprKey</a> reference.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ae8cce7d49083048e263517335bcdbfa8"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_key" class="ref">MprKey</a> *
    mprAddKeyFmt
(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *key, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
  </div>
  <div class="apiDetail">
<p>Add a key with a formatting value into the hash table.</p>
    <dl><dt><b>Description</b>:</dt><dd>Associate a formatted value with a key and insert into the symbol table.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">table</td><td>Symbol table returned via mprCreateHash.</td></tr>
    <tr><td class="param">key</td><td>String key of the symbol entry to delete.</td></tr>
    <tr><td class="param">fmt</td><td>Format string. See <a class="ref" href="#mpr_8h_1ab80b8013c78bb488b6f578cd48702259">mprPrintf</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Integer count of the number of entries.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a13063df55ce4f9037cdbe18ba15242f5"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_key" class="ref">MprKey</a> *
    mprAddKeyWithType
(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *key, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr, int type)
  </div>
  <div class="apiDetail">
<p>Add a symbol value into the hash table and set the key type.</p>
    <dl><dt><b>Description</b>:</dt><dd>Associate an arbitrary value with a string symbol key and insert into the symbol table.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">table</td><td>Symbol table returned via mprCreateHash.</td></tr>
    <tr><td class="param">key</td><td>String key of the symbol entry to delete.</td></tr>
    <tr><td class="param">ptr</td><td>Arbitrary pointer to associate with the key in the table.</td></tr>
    <tr><td class="param">type</td><td>Type of value.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Added <a class="ref" href="#struct_mpr_key">MprKey</a> reference.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a9a1e42096f8a786e2f7836440aab492f"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_mime" class="ref">MprMime</a> *
    mprAddMime
(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ext, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *mimeType)
  </div>
  <div class="apiDetail">
<p>Add a mime type to the mime type table.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">table</td><td>type hash table returned by <a class="ref" href="#mpr_8h_1aa2c27762b461480e0fa9e8e5090e0d66">mprCreateMimeTypes</a></td></tr>
    <tr><td class="param">ext</td><td>Filename extension to use as a key for the given mime type.</td></tr>
    <tr><td class="param">mimeType</td><td>Mime type string to associate with the ext key.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Mime type entry object. This is owned by the mime type table.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a8a5c06bd4458f58c9ed20d043b21bba3"></a>
<div class="api">
  <div class="prototype">
    int
    mprAddNullItem
(<a href="#struct_mpr_list" class="ref">MprList</a> *list)
  </div>
  <div class="apiDetail">
<p>Add a null item to the list.</p>
    <dl><dt><b>Description</b>:</dt><dd>Add a null item to the list. This item does not count in the length returned by mprGetListLength and will not be visible when iterating using <a class="ref" href="#mpr_8h_1ab8c4852b9d8de93f10389b6caa326011">mprGetNextItem</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a159c096de4aec192e25b275f1f5e031d"></a>
<div class="api">
  <div class="prototype">
    void
    mprAddNullToBuf
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)
  </div>
  <div class="apiDetail">
<p>Add a null character to the buffer contents.</p>
    <dl><dt><b>Description</b>:</dt><dd>Add a null byte but do not change the buffer content lengths. The null is added outside the &quot;official&quot; content length. This is useful when calling mprGetBufStart and using the returned pointer as a &quot;C&quot; string pointer.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a3b66bfcf86dc9f50510341e7b5490326"></a>
<div class="api">
  <div class="prototype">
    void
    mprAddRoot
(<a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr)
  </div>
  <div class="apiDetail">
<p>Add a memory block as a root for garbage collection.</p>
    <dl><dt><b>Description</b>:</dt><dd>Remove the root when no longer required via <a class="ref" href="#mpr_8h_1a3b66bfcf86dc9f50510341e7b5490326">mprAddRoot</a></dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ptr</td><td>Any memory pointer.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af41c40264929d075b340fc328165aca4"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_signal" class="ref">MprSignal</a> *
    mprAddSignalHandler
(int signo, void *handler, void *arg, <a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher, int flags)
  </div>
  <div class="apiDetail">
<p>Add a signal handler.</p>
The signal handling mechanism will trap the specified signal if issued and create an event on the given dispatcher. This will cause the handler function to be safely run by the dispatcher. Normally, signal handlers are difficult to write as the code must be Async-safe. This API permits the use of common, single-threaded code to be used for signal handlers without worrying about pre-emption by other signals or threads
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">signo</td><td>Signal number to handle.</td></tr>
    <tr><td class="param">handler</td><td>Call back procedure to invoke. This has the signature <a class="ref" href="#mpr_8h_1ac4a10702a0dc44988261064f0ec18dd8">MprSignalProc</a></td></tr>
    <tr><td class="param">arg</td><td>Argument to provide to the handler.</td></tr>
    <tr><td class="param">dispatcher</td><td>Event dispatcher on which to queue an event to run the handler.</td></tr>
    <tr><td class="param">flags</td><td>Set to either MPR_SIGNAL_BEFORE or MPR_SIGNAL_AFTER to run the handler before/after existing handlers.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a80b7c4b8dc7eeac71df1230b8c5eff67"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_wait_handler" class="ref">MprWaitHandler</a> *
    mprAddSocketHandler
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, int mask, <a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher, void *proc, void *data, int flags)
  </div>
  <div class="apiDetail">
<p>Add a wait handler to a socket.</p>
    <dl><dt><b>Description</b>:</dt><dd>Create a wait handler that will be invoked when I/O of interest occurs on the specified socket. The wait handler is registered with the MPR event I/O mechanism.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object created via mprCreateSocket.</td></tr>
    <tr><td class="param">mask</td><td>Mask of events of interest. This is made by oring MPR_READABLE and MPR_WRITABLE.</td></tr>
    <tr><td class="param">dispatcher</td><td>Dispatcher object to use for scheduling the I/O event.</td></tr>
    <tr><td class="param">proc</td><td>Callback function to invoke when an I/O event of interest has occurred.</td></tr>
    <tr><td class="param">data</td><td>Data item to pass to the callback.</td></tr>
    <tr><td class="param">flags</td><td>Socket handler flags.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A new wait handler registered with the MPR event mechanism.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a86d99126f5c4cf54edda02c98a9142a3"></a>
<div class="api">
  <div class="prototype">
    void
    mprAddSslCiphers
(struct MprSsl *ssl, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ciphers)
  </div>
  <div class="apiDetail">
<p>Add the ciphers to use for SSL.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ssl</td><td>SSL instance returned from <a class="ref" href="#mpr_8h_1af8c1ae4171f8591e9ca89eb02aeedaa8">mprCreateSsl</a></td></tr>
    <tr><td class="param">ciphers</td><td>Cipher string to add to any existing ciphers.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a22299171461b47afdd349666b0c0b996"></a>
<div class="api">
  <div class="prototype">
    void
    mprAddStandardSignals
(void )
  </div>
  <div class="apiDetail">
<p>Add standard trapping of system signals.</p>
The trapped signals are SIGINT, SIGQUIT, SIGTERM, SIGPIPE and SIGXFSZ. SIGPIPE and SIGXFSZ are ignored. A shutdown is initiated for SIGTERM whereas SIGINT and SIGQUIT will do an abortive exit. SIGUSR1 will do an in-process restart
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a34490595fe86683f06e8d6e9abc72aa3"></a>
<div class="api">
  <div class="prototype">
    void
    mprAddTerminator
(<a href="#mpr_8h_1a4b92b1380a1bcb694131c104e1062c4f" class="ref">MprTerminator</a> terminator)
  </div>
  <div class="apiDetail">
<p>Add a service terminator.</p>
    <dl><dt><b>Description</b>:</dt><dd>Services may create shutdown notifiers called terminators that are informed when the application commences a shutdown. The terminator may be invoked several times and the service should take appropriate action based on the MPR state. <br/><br/>
 If the state parameter is set to MPR_STOPPING, the service should not accept any new requests, but otherwise not take any destructive actions. Note this state is required to be reversible if the shutdown is cancelled. <br/><br/>
 If the state is MPR_STOPPED, the service should cancel all running requests, close files and connections and release all resources. This state is not reversible. <br/><br/>
 This exitStrategy parameter is a flags word that defines the shutdown exit strategy. See <a class="ref" href="#mpr_8h_1a2836549ee05ea1901a64a26e51f8ed86">mprShutdown</a> for details. <br/><br/>
 Services may also call <a class="ref" href="#mpr_8h_1a8b6c8348517bf8cb56468cb8106d7147">mprShouldDenyNewRequests</a> to test if the MPR state is MPR_STOPPING and <a class="ref" href="#mpr_8h_1ac79cdd0486a5ee8a6db3e93096f15ee9">mprShouldAbortRequests</a> if the state is MPR_STOPPED.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">terminator</td><td>MprTerminator callback function.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a95de494427536885cd80187593d45d91"></a>
<div class="api">
  <div class="prototype">
    void
    mprAdjustBufEnd
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> count)
  </div>
  <div class="apiDetail">
<p>Adjust the buffer end position.</p>
    <dl><dt><b>Description</b>:</dt><dd>Adjust the buffer end position by the specified amount. This is typically used to advance the end position as content is appended to the buffer. Adjusting the start or end position will change the value returned by mprGetBufLength. If using the mprPutBlock or mprPutChar routines, adjusting the end position is done automatically.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    <tr><td class="param">count</td><td>Positive or negative count of bytes to adjust the end position.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a52128fe8a192cd1cf4541cccf6ce3625"></a>
<div class="api">
  <div class="prototype">
    void
    mprAdjustBufStart
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> count)
  </div>
  <div class="apiDetail">
<p>Adjust the buffer start position.</p>
    <dl><dt><b>Description</b>:</dt><dd>Adjust the buffer start position by the specified amount. This is typically used to advance the start position as content is consumed. Adjusting the start or end position will change the value returned by mprGetBufLength. If using the mprGetBlock or mprGetChar routines, adjusting the start position is done automatically.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    <tr><td class="param">count</td><td>Positive or negative count of bytes to adjust the start position.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1abfa0e5a5c18263ee535d104e214bdaf1"></a>
<div class="api">
  <div class="prototype">
    void *
    mprAlloc
(<a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a> size)
  </div>
  <div class="apiDetail">
<p>Allocate a block of memory.</p>
    <dl><dt><b>Description</b>:</dt><dd>Allocates a block of memory of the required size. The memory is not zeroed.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">size</td><td>Size of the memory block to allocate.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a pointer to the allocated block. If memory is not available the memory exhaustion handler specified via mprCreate will be called to allow global recovery.</dd></dl>
    <dl><dt>Remarks:</dt><dd>Do not mix calls to malloc and mprAlloc.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a6e7ed2574cd71cdf20ae4467f18b4ce9"></a>
<div class="api">
  <div class="prototype">
    void *
    mprAllocMem
(<a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a> size, int flags)
  </div>
  <div class="apiDetail">
<p>Allocate a block of memory.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is the lowest level of memory allocation routine. Memory is freed via the garbage collector. To protect an active memory block memory block from being reclaimed, it must have a reference to it. Memory blocks can specify a manager routine via mprAllocObj. The manager is is invoked by the garbage collector to &quot;mark&quot; dependant active blocks. Marked blocks will not be reclaimed by the garbage collector. <br/><br/>
This function can be called by foreign (non <a class="ref" href="#struct_mpr">Mpr</a>) threads provided you use the MPR_ALLOC_HOLD flag so that the memory will be preserved until you call mprRelease on the memory block. This is important, as without the MPR_ALLOC_HOLD flag, the garbage collector could run immediately after calling mprAlloc and collect the memory. When used in an <a class="ref" href="#struct_mpr">Mpr</a> thread, the garbage collector cannot run until your thread calls <a class="ref" href="#mpr_8h_1af140a2fda18b2e8461236cc44c0a2cc4">mprYield</a> and so the memory is safe from immediate collection.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">size</td><td>Size of the memory block to allocate.</td></tr>
    <tr><td class="param">flags</td><td>Allocation flags. Supported flags include: MPR_ALLOC_MANAGER to reserve room for a manager callback and MPR_ALLOC_ZERO to zero allocated memory. Use MPR_ALLOC_HOLD to return memory immune from GC. Must use this flag if calling from a foreign thread. Use <a class="ref" href="#mpr_8h_1a4816868550ad8a21b914de2fbe720767">mprRelease</a> to release back to the system.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a pointer to the allocated block. If memory is not available the memory exhaustion handler specified via mprCreate will be called to allow global recovery.</dd></dl>
    <dl><dt>Remarks:</dt><dd>Do not mix calls to malloc and mprAlloc.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af395822a182e994a4e8e60059d63b24b"></a>
<div class="api">
  <div class="prototype">
    void *
    mprAllocObj
(<a href="#mpr_8h_1aa49213f0ee6903f508c444506c07dae1" class="ref">Type</a> type, <a href="#mpr_8h_1ad5e84d898dd29853b54cc1b49fcb4041" class="ref">MprManager</a> manager)
  </div>
  <div class="apiDetail">
<p>Allocate an object of a given type.</p>
    <dl><dt><b>Description</b>:</dt><dd>Allocates a zeroed block of memory large enough to hold an instance of the specified type with a manager callback. This call associates a manager function with an object that will be invoked when the object is freed or the garbage collector needs the object to mark internal properties as being used. This call is implemented as a macro.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">type</td><td>Type of the object to allocate.</td></tr>
    <tr><td class="param">manager</td><td>Manager function to invoke when the allocation is managed.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a pointer to the allocated block. If memory is not available the memory exhaustion handler specified via mprCreate will be called to allow global recovery.</dd></dl>
    <dl><dt>Remarks:</dt><dd>Do not mix calls to malloc and mprAlloc.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ae6d19445d6e7dbcb7aae8339b3d1968b"></a>
<div class="api">
  <div class="prototype">
    void *
    mprAllocObjWithFlags
(<a href="#mpr_8h_1aa49213f0ee6903f508c444506c07dae1" class="ref">Type</a> type, <a href="#mpr_8h_1ad5e84d898dd29853b54cc1b49fcb4041" class="ref">MprManager</a> manager, int flags)
  </div>
  <div class="apiDetail">
<p>Allocate an object of a given type.</p>
    <dl><dt><b>Description</b>:</dt><dd>Allocates a zeroed block of memory large enough to hold an instance of the specified type with a manager callback. This call associates a manager function with an object that will be invoked when the object is freed or the garbage collector needs the object to mark internal properties as being used. This call is implemented as a macro. This function can be called by foreign (non <a class="ref" href="#struct_mpr">Mpr</a>) threads provided you use the MPR_ALLOC_HOLD flag so that the memory will be preserved until you call mprRelease on the memory block. This is important as without the MPR_ALLOC_HOLD flag, the garbage collector could run immediately after calling mprAlloc and collect the memory. When used in an <a class="ref" href="#struct_mpr">Mpr</a> thread, the garbage collector cannot run unless you call mprYield and so the memory is safe from immediate collection.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">type</td><td>Type of the object to allocate.</td></tr>
    <tr><td class="param">manager</td><td>Manager function to invoke when the allocation is managed.</td></tr>
    <tr><td class="param">flags</td><td>Allocation flags. Supported flags include: MPR_ALLOC_MANAGER to reserve room for a manager callback and MPR_ALLOC_ZERO to zero allocated memory. Use MPR_ALLOC_HOLD to return memory immune from GC. Must use this flag if calling from a foreign thread. Use <a class="ref" href="#mpr_8h_1a4816868550ad8a21b914de2fbe720767">mprRelease</a> to release back to the system.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a pointer to the allocated block. If memory is not available the memory exhaustion handler specified via mprCreate will be called to allow global recovery.</dd></dl>
    <dl><dt>Remarks:</dt><dd>Do not mix calls to malloc and mprAlloc.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af9dece42b780959e3267d2ad42286b17"></a>
<div class="api">
  <div class="prototype">
    void *
    mprAllocZeroed
(<a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a> size)
  </div>
  <div class="apiDetail">
<p>Allocate a zeroed block of memory.</p>
    <dl><dt><b>Description</b>:</dt><dd>Allocates a zeroed block of memory.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">size</td><td>Size of the memory block to allocate.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a pointer to the allocated block. If memory is not available the memory exhaustion handler specified via mprCreate will be called to allow global recovery.</dd></dl>
    <dl><dt>Remarks:</dt><dd>Do not mix calls to malloc and mprAlloc.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a31498982b50be3573536bb4cd5acaee2"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_list" class="ref">MprList</a> *
    mprAppendList
(<a href="#struct_mpr_list" class="ref">MprList</a> *list, <a href="#struct_mpr_list" class="ref">MprList</a> *add)
  </div>
  <div class="apiDetail">
<p>Append a list.</p>
    <dl><dt><b>Description</b>:</dt><dd>Append the contents of one list to another. The list will grow as required to store the item.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">list</td><td>List pointer returned from <a class="ref" href="#mpr_8h_1aad013e1bb3447a42920f013eceebf174">mprCreateList</a></td></tr>
    <tr><td class="param">add</td><td>List whose contents are added.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a pointer to the original list if successful. Returns NULL on memory allocation errors.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a41a0e9cb643e435b21d5ff37658beec9"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprAreCmdEventsEnabled
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, int channel)
  </div>
  <div class="apiDetail">
<p>Return true if command events are enabled.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    <tr><td class="param">channel</td><td>Channel number to close. Should be either MPR_CMD_STDIN, MPR_CMD_STDOUT or MPR_CMD_STDERR.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if I/O events are enabled for the given channel.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a912d39c3467b133438b984c79c02aee3"></a>
<div class="api">
  <div class="prototype">
    void
    mprAssert
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *loc, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *msg)
  </div>
  <div class="apiDetail">
<p>Output an assure assertion failed message.</p>
    <dl><dt><b>Description</b>:</dt><dd>This will emit an assure assertion failed message to the standard error output. It may bypass the logging system.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">loc</td><td>Source code location string. Use MPR_LOC to define a file name and line number string suitable for this parameter.</td></tr>
    <tr><td class="param">msg</td><td>Simple string message to output.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af64ed09ca5470083fd11e73c9611b3f3"></a>
<div class="api">
  <div class="prototype">
    void
    mprAtomicAdd
(volatile int *target, int value)
  </div>
  <div class="apiDetail">
<p>Atomic Add.</p>
This is a lock free function
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">target</td><td>Address of the target word to add to.</td></tr>
    <tr><td class="param">value</td><td>Value to add to the target.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a70c05a2808827f0f5881a1961c95290c"></a>
<div class="api">
  <div class="prototype">
    void
    mprAtomicAdd64
(volatile int64 *target, <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> value)
  </div>
  <div class="apiDetail">
<p>Atomic 64 bit Add.</p>
This is a lock free function
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">target</td><td>Address of the target word to add to.</td></tr>
    <tr><td class="param">value</td><td>Value to add to the target.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a37da6d7e22d7022da59b6e2930847afa"></a>
<div class="api">
  <div class="prototype">
    void
    mprAtomicBarrier
(int model)
  </div>
  <div class="apiDetail">
<p>Apply a full (read+write) memory barrier.</p>
    <dl><dt><b>Description</b>:</dt><dd>Apply a memory barrier to ensure memory operations are synchronized across threads. This prevents memory reordering by the compiler and CPU.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">model</td><td>Memory model. Set to MPR_ATOMIC_RELAXED, MPR_ATOMIC_CONSUME, MPR_ATOMIC_ACQUIRE, MPR_ATOMIC_RELEASE, MPR_ATOMIC_ACQREL, MPR_ATOMIC_SEQUENTIAL.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1adfb5ebec7f3b7ce4922916dcc49a5749"></a>
<div class="api">
  <div class="prototype">
    int
    mprAtomicCas
(void *volatile *target, void *expected, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *value)
  </div>
  <div class="apiDetail">
<p>Atomic Compare and Swap.</p>
This is a lock free function
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">target</td><td>Address of the target word to swap.</td></tr>
    <tr><td class="param">expected</td><td>Expected value of the target.</td></tr>
    <tr><td class="param">value</td><td>New value to store at the target.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>TRUE if the swap was successful.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a3f7604ac56fad55fbbb4cd38e742b8d1"></a>
<div class="api">
  <div class="prototype">
    void
    mprAtomicListInsert
(void **head, void **link, void *item)
  </div>
  <div class="apiDetail">
<p>Atomic list insertion.</p>
Inserts &quot;item&quot; at the &quot;head&quot; of the list. The &quot;link&quot; field is the next field in item. This is a lock-free function
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">head</td><td>list head.</td></tr>
    <tr><td class="param">link</td><td>Reference to the list head link field.</td></tr>
    <tr><td class="param">item</td><td>Item to insert.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a8e2df88e318f2fbfedc3eb6519e77bf0"></a>
<div class="api">
  <div class="prototype">
    void
    mprAtomicOpen
(void )
  </div>
  <div class="apiDetail">
<p>Open and initialize the atomic subsystem.</p>
    <dl><dt><b>Description</b>:</dt><dd>Initialize the atomic operations subsystem. This must be called before using atomic operations.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a4410e62e1813571e751d231135522476"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_file" class="ref">MprFile</a> *
    mprAttachFileFd
(int fd, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, int omode)
  </div>
  <div class="apiDetail">
<p>Attach to an existing file descriptor.</p>
    <dl><dt><b>Description</b>:</dt><dd>Attach a file to an open file decriptor and return a file object.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">fd</td><td>File descriptor to attach to.</td></tr>
    <tr><td class="param">name</td><td>Descriptive name for the file.</td></tr>
    <tr><td class="param">omode</td><td>Posix style file open mode mask. The open mode may contain the following mask values ored together: <ul><li>O_RDONLY Open read only </li><li>O_WRONLY Open write only </li><li>O_RDWR Open for read and write </li><li>O_CREAT Create or re-create </li><li>O_TRUNC Truncate </li><li>O_BINARY Open for binary data </li><li>O_TEXT Open for text data </li><li>O_EXCL Open with an exclusive lock </li><li>O_APPEND Open to append </li></ul></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns an <a class="ref" href="#struct_mpr_file">MprFile</a> object to use in other file operations.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a763ac59e203e29a6cb6f21a556008ee1"></a>
<div class="api">
  <div class="prototype">
    int
    mprAvailableWorkers
(void )
  </div>
  <div class="apiDetail">
<p>Get the count of available worker threads Return the count of free threads in the worker thread pool.</p>
    <dl><dt>Returns:</dt><dd>An integer count of worker threads.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5f95e2768c6f5e77ebec25bc471d55cb"></a>
<div class="api">
  <div class="prototype">
    int
    mprBackupLog
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, int count)
  </div>
  <div class="apiDetail">
<p>Backup a log.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Base log filename.</td></tr>
    <tr><td class="param">count</td><td>Count of archived logs to keep.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ae82b297b198628e711f84fc62ff9d0f6"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_hash" class="ref">MprHash</a> *
    mprBlendHash
(<a href="#struct_mpr_hash" class="ref">MprHash</a> *target, <a href="#struct_mpr_hash" class="ref">MprHash</a> *other)
  </div>
  <div class="apiDetail">
<p>Blend two hash tables.</p>
    <dl><dt><b>Description</b>:</dt><dd>Blend a hash table into a target hash.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">target</td><td>Target hash to receive the properties from the other hash.</td></tr>
    <tr><td class="param">other</td><td>Hash to provide properties to blend.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns target.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ae916ca4eacb71b4fda228fa7cbb977d3"></a>
<div class="api">
  <div class="prototype">
    int
    mprBlendJson
(<a href="#struct_mpr_json" class="ref">MprJson</a> *dest, <a href="#struct_mpr_json" class="ref">MprJson</a> *src, int flags)
  </div>
  <div class="apiDetail">
<p>Blend two JSON objects.</p>
    <dl><dt><b>Description</b>:</dt><dd>This performs an N-level deep clone of the source JSON object to be blended into the destination object. By default, this add new object properties and overwrite arrays and string values. The property combination prefixes: &apos;+&apos;, &apos;=&apos;, &apos;-&apos; and &apos;?&apos; to append, overwrite, replace and conditionally overwrite are supported if the MPR_JSON_COMBINE flag is present.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">dest</td><td>Parsed JSON object. This is the destination object. The &quot;src&quot; object will be blended into this object.</td></tr>
    <tr><td class="param">src</td><td>Source JSON object to blend into dest. Parsed JSON object returned by mprJsonParser.</td></tr>
    <tr><td class="param">flags</td><td>The MPR_JSON_COMBINE flag enables property name prefixes: &apos;+&apos;, &apos;=&apos;, &apos;-&apos;, &apos;?&apos; to append, overwrite, replace and and conditionally overwrite key values if not already present. When adding string properties, values will be appended using a space separator. Extra spaces will not be removed on replacement. <br/><br/>
 Without MPR_JSON_COMBINE or for properties without a prefix, the default is to blend objects by creating new properties if not already existing in the destination, and to treat overwrite arrays and strings. Use the MPR_JSON_OVERWRITE flag to override the default appending of objects and rather overwrite existing properties. Use the MPR_JSON_APPEND flag to override the default of overwriting arrays and strings and rather append to existing properties.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a4a53a1cb08f0054bea68b74855d555fd"></a>
<div class="api">
  <div class="prototype">
    void
    mprBreakpoint
(void )
  </div>
  <div class="apiDetail">
<p>Trigger a breakpoint.</p>
    <dl><dt><b>Description</b>:</dt><dd>This routine is invoked for assertion errors from <a class="ref" href="#mpr_8h_1a912d39c3467b133438b984c79c02aee3">mprAssert</a> and errors from <a class="ref" href="#mpr_8h_1a3e8ec0097e4869fe9847da2c3b0eca48">mprError</a>. It is useful in debuggers as breakpoint location for detecting errors.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a2dd6f8d47006829959a15ce9af142448"></a>
<div class="api">
  <div class="prototype">
    char *
    mprBufToString
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)
  </div>
  <div class="apiDetail">
<p>Convert the buffer contents to a string.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Allocated string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a757ee20c010c60a42e916537b7a89453"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprCancelShutdown
(void )
  </div>
  <div class="apiDetail">
<p>Cancel a shutdown request.</p>
    <dl><dt><b>Description</b>:</dt><dd>A graceful shutdown request initiated via <a class="ref" href="#mpr_8h_1a2836549ee05ea1901a64a26e51f8ed86">mprShutdown</a> may be cancelled if the shutdown is still in progress and has not passed the point of no return. If the MPR is still in the MPR_STOPPING state, the shutdown may be cancelled. See <a class="ref" href="#mpr_8h_1aa272f768c5eeecf6a22181d5eabeea1e">mprGetState</a></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the shutdown can be cancelled. Returns false if a shutdown has not been requested or if the shutdown has advanced past the point of no return.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa7361e36abe129b975148d3f6faeff8c"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprCheckPassword
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *plainTextPassword, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *passwordHash)
  </div>
  <div class="apiDetail">
<p>Check a plain-text password against the defined hashed password.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">plainTextPassword</td><td>User&apos;s plain-text-password to check.</td></tr>
    <tr><td class="param">passwordHash</td><td>Required password in hashed format previously computed by mprMakePassword.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the password is correct.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1acf49292693e22c7bdc43fbb41a83817d"></a>
<div class="api">
  <div class="prototype">
    void
    mprClearList
(<a href="#struct_mpr_list" class="ref">MprList</a> *list)
  </div>
  <div class="apiDetail">
<p>Clears the list of all items.</p>
    <dl><dt><b>Description</b>:</dt><dd>Resets the list length to zero and clears all items.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">list</td><td>List pointer returned from mprCreateList.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5c7b937729e211ad389b99c2fc8c82b7"></a>
<div class="api">
  <div class="prototype">
    void
    mprClearWaiting
(void )
  </div>
  <div class="apiDetail">
<p>Clear the event service waiting flag.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a89bacfb9bbb1c8129e41210a7f878f13"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_buf" class="ref">MprBuf</a> *
    mprCloneBuf
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *orig)
  </div>
  <div class="apiDetail">
<p>Clone a buffer.</p>
    <dl><dt><b>Description</b>:</dt><dd>Copy the buffer and contents into a newly allocated buffer.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">orig</td><td>Original buffer to copy.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a newly allocated buffer.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a230b37eecf213dc5d714b20e40c91a6c"></a>
<div class="api">
  <div class="prototype">
    char *
    mprCloneBufAsString
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *bp)
  </div>
  <div class="apiDetail">
<p>Clone a buffer contents.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">bp</td><td>Buffer to copy.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a string containing the buffer contents.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1afb83550acf891b29144a0133c3d36897"></a>
<div class="api">
  <div class="prototype">
    char *
    mprCloneBufMem
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *bp)
  </div>
  <div class="apiDetail">
<p>Clone a buffer contents.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">bp</td><td>Buffer to copy.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a newly allocated memory block containing the buffer contents.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a0e4b242b3211bdc24c17d1c83ef77ad2"></a>
<div class="api">
  <div class="prototype">
    MprKeyMprHash *
    mprCloneHash
(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table)
  </div>
  <div class="apiDetail">
<p>Copy a hash table.</p>
    <dl><dt><b>Description</b>:</dt><dd>Create a new hash table and copy all the entries from an existing table.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">table</td><td>Symbol table returned via mprCreateHash.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A new hash table initialized with the contents of the original hash table.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a641a4ab69ff947e50c8bd6763a3b9e9f"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_json" class="ref">MprJson</a> *
    mprCloneJson
(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj)
  </div>
  <div class="apiDetail">
<p>Clone a JSON object.</p>
    <dl><dt><b>Description</b>:</dt><dd>This does a deep copy of a JSON object tree. This copies all properties and their sub-properties.</dd></dl>
    <dl><dt>Returns:</dt><dd>A new JSON object that replices the input object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a177c262ad7aec553d0ba5a3925aeddb5"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_list" class="ref">MprList</a> *
    mprCloneList
(<a href="#struct_mpr_list" class="ref">MprList</a> *src)
  </div>
  <div class="apiDetail">
<p>Clone a list and all elements.</p>
    <dl><dt><b>Description</b>:</dt><dd>Copy the contents of a list into a new list.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">src</td><td>Source list to copy.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a new list reference.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a86f9e7d6fa1e7bea6d16720a4873c7f7"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_socket" class="ref">MprSocket</a> *
    mprCloneSocket
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)
  </div>
  <div class="apiDetail">
<p>Clone a socket object.</p>
    <dl><dt><b>Description</b>:</dt><dd>Create an exact copy of a socket object. On return both socket objects share the same O/S socket handle. If the original socket has an SSL configuration, the new socket will share the same SSL configuration object.</dd></dl>
    <dl><dt>Returns:</dt><dd>A new socket object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a2fd29640fe5c0d10b45ba8e7fbba5bc2"></a>
<div class="api">
  <div class="prototype">
    struct MprSsl *
    mprCloneSsl
(<a href="#struct_mpr_ssl" class="ref">MprSsl</a> *src)
  </div>
  <div class="apiDetail">
<p>Create the a new SSL control structure based on an existing structure.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">src</td><td>Structure to clone.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac48a59b1bfc4f3944a88e152863c3d32"></a>
<div class="api">
  <div class="prototype">
    void
    mprCloseCmdFd
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, int channel)
  </div>
  <div class="apiDetail">
<p>Close the command channel.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    <tr><td class="param">channel</td><td>Channel number to close. Should be either MPR_CMD_STDIN, MPR_CMD_STDOUT or MPR_CMD_STDERR.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1abed0e8f716912b0f4e928c32480a0c06"></a>
<div class="api">
  <div class="prototype">
    int
    mprCloseFile
(<a href="#struct_mpr_file" class="ref">MprFile</a> *file)
  </div>
  <div class="apiDetail">
<p>Close a file.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call closes a file without destroying the file object.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">file</td><td>File instance returned from <a class="ref" href="#mpr_8h_1a7c2b7b9e2b2aa88b4d742f9b2c5ccfd7">mprOpenFile</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns zero if successful, otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5bd6e40cb8a29c92a8f5e1ce9529b726"></a>
<div class="api">
  <div class="prototype">
    void
    mprCloseSocket
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> graceful)
  </div>
  <div class="apiDetail">
<p>Close a socket.</p>
    <dl><dt><b>Description</b>:</dt><dd>Close a socket. If the graceful option is true, the socket will first wait for written data to drain before doing a graceful close.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    <tr><td class="param">graceful</td><td>Set to true to do a graceful close. Otherwise, an abortive close will be performed.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aab2501188e2f3f59008f8f27e14732e9"></a>
<div class="api">
  <div class="prototype">
    void
    mprCompactBuf
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)
  </div>
  <div class="apiDetail">
<p>Compact the buffer contents.</p>
    <dl><dt><b>Description</b>:</dt><dd>Compact the buffer contents by copying the contents down to start the the buffer origin.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a087ffc47d75b5f88dbfcabb8c3cd2d21"></a>
<div class="api">
  <div class="prototype">
    int
    mprCompareTime
(<a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="ref">MprTime</a> t1, <a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="ref">MprTime</a> t2)
  </div>
  <div class="apiDetail">
<p>Compare two times.</p>
    <dl><dt><b>Description</b>:</dt><dd>Compare two times and return a code indicating which is greater, less or equal.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">t1</td><td>First time.</td></tr>
    <tr><td class="param">t2</td><td>Second time.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if equal, -1 if t1 is less than t2 otherwise one.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a7157efc602b90ef7786eb89d31ffa6f7"></a>
<div class="api">
  <div class="prototype">
    int
    mprConnectSocket
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ip, int port, int flags)
  </div>
  <div class="apiDetail">
<p>Connect a client socket.</p>
    <dl><dt><b>Description</b>:</dt><dd>Open a client connection.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned via <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    <tr><td class="param">ip</td><td>Host or IP address to connect to.</td></tr>
    <tr><td class="param">port</td><td>TCP/IP port number to connect to.</td></tr>
    <tr><td class="param">flags</td><td>Socket flags may use the following flags ored together: <ul><li>MPR_SOCKET_BLOCK - to use blocking I/O. The default is non-blocking. </li><li>MPR_SOCKET_BROADCAST - Use IPv4 broadcast </li><li>MPR_SOCKET_DATAGRAM - Use IPv4 datagrams </li><li>MPR_SOCKET_NOREUSE - Set NOREUSE flag on the socket </li><li>MPR_SOCKET_NODELAY - Set NODELAY on the socket </li><li>MPR_SOCKET_THREAD - Process callbacks on a separate thread. </li></ul></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if the connection is successful. Otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a9d17735f686e0bc754343253795d79ac"></a>
<div class="api">
  <div class="prototype">
    int
    mprCopyListContents
(<a href="#struct_mpr_list" class="ref">MprList</a> *dest, <a href="#struct_mpr_list" class="ref">MprList</a> *src)
  </div>
  <div class="apiDetail">
<p>Copy list contents.</p>
    <dl><dt><b>Description</b>:</dt><dd>Copy the contents of a list into an existing list. The destination list is cleared first and has its dimensions set to that of the source clist.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">dest</td><td>Destination list for the copy.</td></tr>
    <tr><td class="param">src</td><td>Source list.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns zero if successful, otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a358d2532cd4fe229f4118ca181b4b721"></a>
<div class="api">
  <div class="prototype">
    int
    mprCopyPath
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *from, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *to, int omode)
  </div>
  <div class="apiDetail">
<p>Copy a file.</p>
    <dl><dt><b>Description</b>:</dt><dd>Create a new copy of a file with the specified open permissions mode.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">from</td><td>Path of the existing file to copy.</td></tr>
    <tr><td class="param">to</td><td>Name of the new file copy.</td></tr>
    <tr><td class="param">omode</td><td>Posix style file open mode mask. See <a class="ref" href="#mpr_8h_1a7c2b7b9e2b2aa88b4d742f9b2c5ccfd7">mprOpenFile</a> for the various modes.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the file exists and can be accessed.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a000f7f94708664e292b1bddeb69a7996"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr" class="ref">Mpr</a> *
    mprCreate
(int argc, char **argv, int flags)
  </div>
  <div class="apiDetail">
<p>Initialize the application by creating an instance of the MPR.</p>
    <dl><dt><b>Description</b>:</dt><dd>Initializes the MPR and creates an <a class="ref" href="#struct_mpr">Mpr</a> control object. The <a class="ref" href="#struct_mpr">Mpr</a> Object manages all MPR facilities and services. This must be called before using any MPR API. When processing is complete, you should call <a class="ref" href="#mpr_8h_1a4f36e049582f33f7384fd5648db77a2a">mprDestroy</a> before exiting the application.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">argc</td><td>Count of command line args.</td></tr>
    <tr><td class="param">argv</td><td>Command line arguments for the application. Arguments may be passed into the <a class="ref" href="#struct_mpr">Mpr</a> for retrieval by the unit test framework.</td></tr>
    <tr><td class="param">flags</td><td>Set MPR_USER_EVENTS_THREAD if you will manage calling <a class="ref" href="#mpr_8h_1a205adaee3b45d0cc899afc89eb9f3b3d">mprServiceEvents</a> manually if required. There are three styles of MPR applications with respect to servicing events: <br/><br/>
 1) Applications that don&apos;t require servicing events for I/O, commands or timers <br/><br/>
 2) Applications that call <a class="ref" href="#mpr_8h_1a205adaee3b45d0cc899afc89eb9f3b3d">mprServiceEvents</a> directly from their main program <br/><br/>
 3) Applications that have a dedicated service events thread <br/><br/>
 Applications that do not perform I/O, run commands or create events may not need a service events thread. While creating one will do no harm, performance may be enhanced for these applications by specifying MPR_USER_EVENTS_THREAD. <br/><br/>
 Applications that have not forground processing requirements may invoke <a class="ref" href="#mpr_8h_1a205adaee3b45d0cc899afc89eb9f3b3d">mprServiceEvents</a> from their main program instead of creating a service events thread. This saves one thread. <br/><br/>
 The default is to create a service events thread so the full scope of MPR services are supported.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a pointer to the <a class="ref" href="#struct_mpr">Mpr</a> object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a9de0736b6967e4569192d230f16b8d71"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_buf" class="ref">MprBuf</a> *
    mprCreateBuf
(<a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> initialSize, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> maxSize)
  </div>
  <div class="apiDetail">
<p>Create a new buffer.</p>
    <dl><dt><b>Description</b>:</dt><dd>Create a new buffer.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">initialSize</td><td>Initial size of the buffer.</td></tr>
    <tr><td class="param">maxSize</td><td>Maximum size the buffer can grow to.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A new buffer.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a723be1009e7b9cd130cc53f2f3545e94"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_cache" class="ref">MprCache</a> *
    mprCreateCache
(int options)
  </div>
  <div class="apiDetail">
<p>Create a new cache object.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">options</td><td>Set of option flags. Use <a class="ref" href="#mpr_8h_1aa79b26057bf373035743f9fb36b1620e">MPR_CACHE_SHARED</a> to select a global shared cache object.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A cache instance object. On error, return null.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a8e4a26f0e48b79a6ae677c97040ccf0c"></a>
<div class="api">
  <div class="prototype">
    int
    mprCreateCacheService
(void )
  </div>
  <div class="apiDetail">
<p>Initialize the cache service on startup.</p>
Should only be called by the MPR init on startup
    <dl><dt>Returns:</dt><dd>Zero if successful.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a707b8f9bc8cf13f3a4d9c463f93b5487"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_cmd" class="ref">MprCmd</a> *
    mprCreateCmd
(<a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher)
  </div>
  <div class="apiDetail">
<p>Create a new Command object.</p>
    <dl><dt>Returns:</dt><dd>A newly allocated <a class="ref" href="#struct_mpr_cmd">MprCmd</a> object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a563cf7257bd5ed5d1024cd457bae598f"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_cond" class="ref">MprCond</a> *
    mprCreateCond
(void )
  </div>
  <div class="apiDetail">
<p>Create a condition lock variable.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call creates a condition variable object that can be used in <a class="ref" href="#mpr_8h_1a2902c6005212638d289e867d567e16d7">mprWaitForCond</a> and <a class="ref" href="#mpr_8h_1ab014329886bcb9a8cb9b970afc30378b">mprSignalCond</a> calls.</dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a new condition variable object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af056d41b7726fec58ee0381773d2d7df"></a>
<div class="api">
  <div class="prototype">
    <a href="#mpr_8h_1ab609e9e7685d987a32bd0040f2ad6adf" class="ref">MprDiskFileSystem</a> *
    mprCreateDiskFileSystem
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Create and initialize the disk FileSystem.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is an internal routine called by the MPR during initialization.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path name to the root of the file system.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a new file system object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a1da72b3760024ca15d93ade76de8e33a"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *
    mprCreateDispatcher
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, int flags)
  </div>
  <div class="apiDetail">
<p>Create a new event dispatcher.</p>
    <dl><dt><b>Description</b>:</dt><dd>Dispatchers are event queues that serialize the execution of work. Most of the MPR routines are not thread-safe and thus access to objects needs to be serialized by creating events to run on dispatchers. Resources such as connections will typically own a dispatcher that is used to serialize their work.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">name</td><td>Useful name for debugging.</td></tr>
    <tr><td class="param">flags</td><td>Dispatcher flags.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A Dispatcher object that can manage events and be used with mprCreateEvent.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1abdf25e12b2bcc5c116599b639cc18d5c"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_event" class="ref">MprEvent</a> *
    mprCreateEvent
(<a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> period, void *proc, void *data, int flags)
  </div>
  <div class="apiDetail">
<p>Queue an new event on a dispatcher.</p>
    <dl><dt><b>Description</b>:</dt><dd>Create an event to run a callback on an event dispatcher queue. The MPR serializes work in a thread-safe manner on dispatcher queues. Resources such as connections will typically own a dispatcher that is used to serialize their work. <br/><br/>
 This API may be called by foreign (non-mpr) threads and this routine is the only safe way to invoke MPR services from a foreign-thread. The reason for this is that the MPR uses a cooperative garbage collector and a foreign thread may call into the MPR at an inopportune time when the MPR is running the garbage collector which requires sole access to application memory.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">dispatcher</td><td>Dispatcher object created via mprCreateDispatcher Set to NULL for the MPR dispatcher. Use MPR_EVENT_QUICK in the flags to run the event on the events nonBlock dispatcher. This should only be used for quick, non-block event callbacks. If using another dispatcher, it is essential that the dispatcher not be destroyed while this event is queued or running.</td></tr>
    <tr><td class="param">name</td><td>Static string name of the event used for debugging.</td></tr>
    <tr><td class="param">period</td><td>Time in milliseconds used by continuous events between firing of the event.</td></tr>
    <tr><td class="param">proc</td><td>Function to invoke when the event is run.</td></tr>
    <tr><td class="param">data</td><td>Data to associate with the event and stored in event-&gt;data. The data must be either an allocated memory object or MPR_EVENT_STATIC_DATA must be specified in flags.</td></tr>
    <tr><td class="param">flags</td><td>Flags to modify the behavior of the event. Valid values are: MPR_EVENT_CONTINUOUS to create an event which will be automatically rescheduled according to the specified period. Use MPR_EVENT_STATIC_DATA if the data argument does not point to a memory object allocated by the <a class="ref" href="#struct_mpr">Mpr</a>. Include MPR_EVENT_QUICK to execute the event without utilizing using a worker thread. This should only be used for quick non-blocking event callbacks. <br/><br/>
 When calling this routine from foreign threads, you should use a NULL dispatcher or guarantee the dispatcher is held by other means (difficult). Data supplied from foreign threads should generally be non-mpr memory and must persist until the callback has completed. This typically means the data memory should either be static or be allocated using malloc() before the call and released via free() in the callback. Static data should use the MPR_EVENT_STATIC_DATA flag. Use the MPR_EVENT_ALWAYS_CALL to ensure your callback is always invoked even if the dispatcher is destroyed before the event is run. In such cases, the callback &quot;event&quot; argument will be NULL to indicate the dispatcher has been destroyed. Use this flag to free any allocated &quot;data&quot; memory in the callback. This may be important to prevent leaks. <br/><br/>
 If using Appweb or the Http library, it is preferable to use the httpCreateEvent API when invoking callbacks on HttpStreams.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The event object. If called from a foreign thread, note that the event may have already run and the event object may have been collected by the GC. May return NULL if the dispatcher has already been destroyed.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a18bd67b1021247082ff8e853966dc361"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_hash" class="ref">MprHash</a> *
    mprCreateHash
(int hashSize, int flags)
  </div>
  <div class="apiDetail">
<p>Create a hash table.</p>
    <dl><dt><b>Description</b>:</dt><dd>Creates a hash table that can store arbitrary objects associated with string key values.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">hashSize</td><td>Size of the hash table for the symbol table. Should be a prime number. Set to 0 or -1 to get a default (small) hash table.</td></tr>
    <tr><td class="param">flags</td><td>Table control flags. Use MPR_HASH_CASELESS for case insensitive comparisons, MPR_HASH_UNICODE if the hash keys are unicode strings, MPR_HASH_STATIC_KEYS if the keys are permanent and should not be managed for Garbage collection, and MPR_HASH_STATIC_VALUES if the values are permanent. MPR_HASH_STABLE to create an optimized list when the contents are stable or only accessed by one thread.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a pointer to the allocated symbol table.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a684b4ca5b08405b88c5f71c2806c99aa"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_hash" class="ref">MprHash</a> *
    mprCreateHashFromWords
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Create a hash of words.</p>
    <dl><dt><b>Description</b>:</dt><dd>Create a hash table of words from the given string. The hash key entry is the same as the key. The word separators are white space and comma.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String containing white space or comma separated words.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a hash of words.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a6d3a70c7850c5aead6509818ab784b2f"></a>
<div class="api">
  <div class="prototype">
    void
    mprCreateIOEvent
(<a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher, void *proc, void *data, struct MprWaitHandler *wp, struct MprSocket *sock)
  </div>
  <div class="apiDetail">
<p>Create and queue an IO event for a wait handler.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">dispatcher</td><td>Event dispatcher created via mprCreateDispatcher.</td></tr>
    <tr><td class="param">proc</td><td>Function to invoke when the event is run.</td></tr>
    <tr><td class="param">data</td><td>Data to associate with the event. See <a class="ref" href="#mpr_8h_1abdf25e12b2bcc5c116599b639cc18d5c">mprCreateEvent</a> for details.</td></tr>
    <tr><td class="param">wp</td><td>WaitHandler reference created via mprWaitHandler.</td></tr>
    <tr><td class="param">sock</td><td>Socket for the I/O event.</td></tr>
    </table></dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#struct_mpr_event" class="ref">MprEvent</a>, <a href="#struct_mpr_wait_handler" class="ref">MprWaitHandler</a>, <a href="#mpr_8h_1abdf25e12b2bcc5c116599b639cc18d5c" class="ref">mprCreateEvent</a>, <a href="#mpr_8h_1a90c04576c4f4f15dee8b118f2e53ed63" class="ref">mprCreateWaitHandler</a>, <a href="#mpr_8h_1a52f88939c5c03270beff007574b4aeb0" class="ref">mprQueueIOEvent</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1adece02d2e6bb191f587261f527aacdbe"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_json" class="ref">MprJson</a> *
    mprCreateJson
(int type)
  </div>
  <div class="apiDetail">
<p>Create a JSON object.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">type</td><td>Set JSON object type to MPR_JSON_OBJ for an object, MPR_JSON_ARRAY for an array or MPR_JSON_VALUE for a value. Note: all values are stored as strings. Additional type information may be ored into the type for: MPR_JSON_NUMBER, MPR_JSON_TRUE, MPR_JSON_FALSE, MPR_JSON_NULL, MPR_JSON_UNDEFINED.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>JSON object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1adbc11d4801dcb3fbcfd2243d23ee29b1"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_json" class="ref">MprJson</a> *
    mprCreateJsonValue
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value, int type)
  </div>
  <div class="apiDetail">
<p>Create a JSON object value.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">value</td><td>String value of the json object.</td></tr>
    <tr><td class="param">type</td><td>Set JSON object type to MPR_JSON_OBJ for an object, MPR_JSON_ARRAY for an array or MPR_JSON_VALUE for a value. Note: all values are stored as strings. Additional type information may be ored into the type for: MPR_JSON_NUMBER, MPR_JSON_TRUE, MPR_JSON_FALSE, MPR_JSON_NULL, MPR_JSON_UNDEFINED.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>JSON object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa32ad3675623f779762d9580de7dccec"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_key_value" class="ref">MprKeyValue</a> *
    mprCreateKeyPair
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value, int flags)
  </div>
  <div class="apiDetail">
<p>Create a key / value pair.</p>
    <dl><dt><b>Description</b>:</dt><dd>Allocate and initialize a key value pair for use by the <a class="ref" href="#struct_mpr_list">MprList</a> or <a class="ref" href="#struct_mpr_hash">MprHash</a> modules.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">key</td><td>Key string.</td></tr>
    <tr><td class="param">value</td><td>Key value string.</td></tr>
    <tr><td class="param">flags</td><td>Flags value.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An initialized <a class="ref" href="#struct_mpr_key_value">MprKeyValue</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aad013e1bb3447a42920f013eceebf174"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_list" class="ref">MprList</a> *
    mprCreateList
(int size, int flags)
  </div>
  <div class="apiDetail">
<p>Create a list.</p>
    <dl><dt><b>Description</b>:</dt><dd>Creates an empty list. <a class="ref" href="#struct_mpr_list">MprList</a>&apos;s can store generic pointers. They automatically grow as required when items are added to the list.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">size</td><td>Initial capacity of the list. Set to &lt; 0 to get a growable list with a default initial size. Set to 0 to to create the list but without any initial list storage. Then call mprSetListLimits to define the initial and maximum list size.</td></tr>
    <tr><td class="param">flags</td><td>Control flags. Possible values are: MPR_LIST_STATIC_VALUES to indicate list items are static and should not be marked for GC. MPR_LIST_STABLE to create an optimized list for private use that is not thread-safe.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a pointer to the list.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af5902c7c695d6dac07e0847854f01174"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_list" class="ref">MprList</a> *
    mprCreateListFromWords
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Create a list of words.</p>
    <dl><dt><b>Description</b>:</dt><dd>Create a list of words from the given string. The word separators are white space and comma.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String containing white space or comma separated words.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a list of words.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a62dcab1168ef4f4521a9120310872750"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_event" class="ref">MprEvent</a> *
    mprCreateLocalEvent
(<a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> period, void *proc, void *data, int flags)
  </div>
  <div class="apiDetail">
<p>Optimized variety of mprCreateEvent for use by local MPR threads only.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">dispatcher</td><td>Event dispatcher created via mprCreateDispatcher.</td></tr>
    <tr><td class="param">name</td><td>Static string name of the event used for debugging.</td></tr>
    <tr><td class="param">period</td><td>Time in milliseconds used by continuous events between firing of the event.</td></tr>
    <tr><td class="param">proc</td><td>Function to invoke when the event is run.</td></tr>
    <tr><td class="param">data</td><td>Data to associate with the event. See <a class="ref" href="#mpr_8h_1abdf25e12b2bcc5c116599b639cc18d5c">mprCreateEvent</a> for details.</td></tr>
    <tr><td class="param">flags</td><td>Flags. See <a class="ref" href="#mpr_8h_1abdf25e12b2bcc5c116599b639cc18d5c">mprCreateEvent</a> for details.</td></tr>
    </table></dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#struct_mpr_event" class="ref">MprEvent</a>, <a href="#struct_mpr_wait_handler" class="ref">MprWaitHandler</a>, <a href="#mpr_8h_1abdf25e12b2bcc5c116599b639cc18d5c" class="ref">mprCreateEvent</a>, <a href="#mpr_8h_1a90c04576c4f4f15dee8b118f2e53ed63" class="ref">mprCreateWaitHandler</a>, <a href="#mpr_8h_1a52f88939c5c03270beff007574b4aeb0" class="ref">mprQueueIOEvent</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a1c8cb9039500adccdfab41502d1b51f0"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_mutex" class="ref">MprMutex</a> *
    mprCreateLock
(void )
  </div>
  <div class="apiDetail">
<p>Create a Mutex lock object.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call creates a Mutex lock object that can be used in mprLock <a class="ref" href="#mpr_8h_1a2b3b8e824b92499192ea48512e31c26d">mprTryLock</a> and mprUnlock calls.</dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a new mutex lock object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ae45b44716c1a7a18e19dbc248d41fbce"></a>
<div class="api">
  <div class="prototype">
    void
    mprCreateLogService
(void )
  </div>
  <div class="apiDetail">
<p>Initialize the log service.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a89524cfbcea2fc955ae583ac90e53368"></a>
<div class="api">
  <div class="prototype">
    struct Mpr *
    mprCreateMemService
(<a href="#mpr_8h_1ad5e84d898dd29853b54cc1b49fcb4041" class="ref">MprManager</a> manager, int flags)
  </div>
  <div class="apiDetail">
<p>Create and initialize the Memory service.</p>
    <dl><dt><b>Description</b>:</dt><dd>Called internally by the MPR. Should not be called by users.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">manager</td><td>Memory manager to manage the <a class="ref" href="#struct_mpr">Mpr</a> object.</td></tr>
    <tr><td class="param">flags</td><td>Memory initialization control flags.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The <a class="ref" href="#struct_mpr">Mpr</a> control structure.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa2c27762b461480e0fa9e8e5090e0d66"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_hash" class="ref">MprHash</a> *
    mprCreateMimeTypes
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Create the mime types.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Filename of a mime types definition file.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Hash table of mime types keyed by file extension.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a35f4f35014f5601bb37ba7bbfcac62be"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_module" class="ref">MprModule</a> *
    mprCreateModule
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *entry, void *data)
  </div>
  <div class="apiDetail">
<p>Create a module.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call will create a module object for a loadable module. This should be invoked by the module itself in its module entry point to register itself with the MPR.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">name</td><td>Name of the module.</td></tr>
    <tr><td class="param">path</td><td>Optional filename of a module library to load. When loading, the filename will be searched using the defined module search path (see <a class="ref" href="#mpr_8h_1a43d50c6e385a3592778d00c1dc53a8e7">mprSetModuleSearchPath</a>). The filename may or may not include a platform specific shared library extension such as .dll, .so or .dylib. By omitting the library extension, code can portably load shared libraries.</td></tr>
    <tr><td class="param">entry</td><td>Name of function to invoke after loading the module.</td></tr>
    <tr><td class="param">data</td><td>Arbitrary data pointer. This will be defined in MprModule.data and passed into the module initialization entry point.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A module object for this module.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5b4d1daf88d69ef0609140ba1245e333"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_module_service" class="ref">MprModuleService</a> *
    mprCreateModuleService
(void )
  </div>
  <div class="apiDetail">
<p>Create and initialize the module service.</p>
    <dl><dt>Returns:</dt><dd><a class="ref" href="#struct_mpr_module_service">MprModuleService</a> object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a8aa37eb2e397ec2d78e6df15a0d303c5"></a>
<div class="api">
  <div class="prototype">
    int
    mprCreateNotifierService
(<a href="#struct_mpr_wait_service" class="ref">MprWaitService</a> *ws)
  </div>
  <div class="apiDetail">
<p>Internal.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af3272904f3223b0a7e90967c5d7fd3cd"></a>
<div class="api">
  <div class="prototype">
    int
    mprCreateOsService
(void )
  </div>
  <div class="apiDetail">
<p>Create and initialze the O/S dependent subsystem.</p>
    <dl><dt><b>Description</b>:</dt><dd>Called internally by the MPR. Should not be called by users.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a84ae1c2805746ecb946f3bb7f65107c0"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_rom_file_system" class="ref">MprRomFileSystem</a> *
    mprCreateRomFileSystem
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="#struct_mpr_rom_inode" class="ref">MprRomInode</a> *inodes)
  </div>
  <div class="apiDetail">
<p>Create and initialize the ROM FileSystem.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is an internal routine called by the MPR during initialization.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path name to the root of the file system.</td></tr>
    <tr><td class="param">inodes</td><td>File definitions.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a new file system object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_socket" class="ref">MprSocket</a> *
    mprCreateSocket
(void )
  </div>
  <div class="apiDetail">
<p>Create a socket.</p>
    <dl><dt><b>Description</b>:</dt><dd>Create a new socket.</dd></dl>
    <dl><dt>Returns:</dt><dd>A new socket object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5c274c45a6ecaeb4fed542a9f74a6fc6"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_spin" class="ref">MprSpin</a> *
    mprCreateSpinLock
(void )
  </div>
  <div class="apiDetail">
<p>Create a spin lock lock object.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call creates a spinlock object that can be used in mprSpinLock, and mprSpinUnlock calls. Spin locks using <a class="ref" href="#struct_mpr_spin">MprSpin</a> are much faster than <a class="ref" href="#struct_mpr_mutex">MprMutex</a> based locks on some systems.</dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a new spinlock object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af8c1ae4171f8591e9ca89eb02aeedaa8"></a>
<div class="api">
  <div class="prototype">
    struct MprSsl *
    mprCreateSsl
(int server)
  </div>
  <div class="apiDetail">
<p>Create the SSL control structure.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">server</td><td>True if the SSL configuration will be used on the server side.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1afad5f424b850bf2aa9f995f6c0a62fc1"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_thread" class="ref">MprThread</a> *
    mprCreateThread
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, void *proc, void *data, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> stackSize)
  </div>
  <div class="apiDetail">
<p>Create a new thread.</p>
    <dl><dt><b>Description</b>:</dt><dd>MPR threads are usually real O/S threads and can be used with the various locking services (<a class="ref" href="#struct_mpr_mutex">MprMutex</a>, <a class="ref" href="#struct_mpr_cond">MprCond</a>, <a class="ref" href="#struct_mpr_spin">MprSpin</a>) to enable scalable multithreaded applications.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">name</td><td>Unique name to give the thread.</td></tr>
    <tr><td class="param">proc</td><td>Entry point function for the thread. <a class="ref" href="#mpr_8h_1a35c53df918c2f52e2e1f6961e35ee8d1">mprStartThread</a> will invoke this function to start the thread.</td></tr>
    <tr><td class="param">data</td><td>Thread private data stored in <a class="ref" href="#struct_mpr_thread_1a781a2b32433d92cd0aa481895ad8ed53">MprThread.data</a></td></tr>
    <tr><td class="param">stackSize</td><td>Stack size to use for the thread. On VM based systems, increasing this value, does not necessarily incurr a real memory (working-set) increase. Set to zero for a default stack size.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A <a class="ref" href="#struct_mpr_thread">MprThread</a> object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a8fb1ca3773c88a3bb9c1bddaf63ada99"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_event" class="ref">MprEvent</a> *
    mprCreateTimerEvent
(<a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> period, void *proc, void *data, int flags)
  </div>
  <div class="apiDetail">
<p>Create a timer event.</p>
    <dl><dt><b>Description</b>:</dt><dd>Create and queue a timer event for service. This is a convenience wrapper to create continuous events over the <a class="ref" href="#mpr_8h_1abdf25e12b2bcc5c116599b639cc18d5c">mprCreateEvent</a> call.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">dispatcher</td><td>Dispatcher object created via <a class="ref" href="#mpr_8h_1a1da72b3760024ca15d93ade76de8e33a">mprCreateDispatcher</a></td></tr>
    <tr><td class="param">name</td><td>Debug name of the event.</td></tr>
    <tr><td class="param">proc</td><td>Function to invoke when the event is run.</td></tr>
    <tr><td class="param">period</td><td>Time in milliseconds used by continuous events between firing of the event.</td></tr>
    <tr><td class="param">data</td><td>Data to associate with the event and stored in event-&gt;data.</td></tr>
    <tr><td class="param">flags</td><td>Reserved. Must be set to zero.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The event object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a7470862a8c3db1e0ffcd83ad12a512be"></a>
<div class="api">
  <div class="prototype">
    int
    mprCreateTimeService
(void )
  </div>
  <div class="apiDetail">
<p><a class="ref" href="#struct_mpr">Mpr</a> time structure.</p>
    <dl><dt><b>Description</b>:</dt><dd>MprTime is the cross platform time abstraction structure. Time is stored as milliseconds since the epoch: 00:00:00 UTC Jan 1 1970. MprTime is typically a 64 bit quantity.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a90c04576c4f4f15dee8b118f2e53ed63"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_wait_handler" class="ref">MprWaitHandler</a> *
    mprCreateWaitHandler
(int fd, int mask, <a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher, void *proc, void *data, int flags)
  </div>
  <div class="apiDetail">
<p>Create a wait handler.</p>
    <dl><dt><b>Description</b>:</dt><dd>Create a wait handler that will be invoked when I/O of interest occurs on the specified file handle The wait handler is registered with the MPR event I/O mechanism.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">fd</td><td>File descriptor.</td></tr>
    <tr><td class="param">mask</td><td>Mask of events of interest. This is made by oring MPR_READABLE and MPR_WRITABLE.</td></tr>
    <tr><td class="param">dispatcher</td><td>Dispatcher object to use for scheduling the I/O event.</td></tr>
    <tr><td class="param">proc</td><td>Callback function to invoke when an I/O event of interest has occurred.</td></tr>
    <tr><td class="param">data</td><td>Data item to pass to the callback.</td></tr>
    <tr><td class="param">flags</td><td>Wait handler flags. Use MPR_WAIT_NEW_DISPATCHER to auto-create a new dispatcher for each I/O event.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A new wait handler registered with the MPR event mechanism.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a6e446e242befb2f9d4b64dabef755c21"></a>
<div class="api">
  <div class="prototype">
    char *
    mprCryptPassword
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *password, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *salt, int rounds)
  </div>
  <div class="apiDetail">
<p>Encrypt a password using the Blowfish algorithm.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">password</td><td>User&apos;s password to encrypt.</td></tr>
    <tr><td class="param">salt</td><td>Salt text to add to password. Helps to make each user&apos;s password unique.</td></tr>
    <tr><td class="param">rounds</td><td>Number of times to encrypt. More times, makes the routine slower and passwords harder to crack.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The encrypted password.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a6ef562d3d273642db1405daaa65c04e9"></a>
<div class="api">
  <div class="prototype">
    int
    mprDaemon
(void )
  </div>
  <div class="apiDetail">
<p>Convert the process into a daemon on unix systems.</p>
    <dl><dt><b>Description</b>:</dt><dd>This converts the current process into a detached child without a parent.</dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful. Otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a08742c4a5b8340886661acd20827b12c"></a>
<div class="api">
  <div class="prototype">
    void
    mprDebug
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *tags, int level, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
  </div>
  <div class="apiDetail">
<p>Write a log message to the log file when the product is built in debug mode.</p>
    <dl><dt><b>Description</b>:</dt><dd>This routine permits the addition of debug messages that are compiled out in production builds.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">tags</td><td>List of space separated tag words.</td></tr>
    <tr><td class="param">level</td><td>Logging level for this message. The level is 0-5 with five being the most verbose.</td></tr>
    <tr><td class="param">fmt</td><td>Printf style format string. Variable number of arguments to.</td></tr>
    <tr><td class="param">...</td><td>Variable number of arguments for printf data.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a0baa25ccc4220f5a64804cfc50c4b394"></a>
<div class="api">
  <div class="prototype">
    char *
    mprDecode64
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Decode a null terminated string using base-46 encoding.</p>
    <dl><dt><b>Description</b>:</dt><dd>Decoding will terminate at the first null or &apos;=&apos;.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to decode.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Buffer containing the encoded data.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1acf9eabca8a83df96d80c45e0384520b5"></a>
<div class="api">
  <div class="prototype">
    char *
    mprDecode64Block
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> *len, int flags)
  </div>
  <div class="apiDetail">
<p>Decode a null terminated string using base-46 encoding.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>String to decode.</td></tr>
    <tr><td class="param">len</td><td>Return parameter with the Length of the decoded data.</td></tr>
    <tr><td class="param">flags</td><td>Set to MPR_DECODE_TOKEQ to stop at the first &apos;=&apos;.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Buffer containing the encoded data and returns length in len.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a1e078d6a9ff6fca1fc5cf3653264aa57"></a>
<div class="api">
  <div class="prototype">
    void
    mprDecodeLocalTime
(struct tm *timep, <a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="ref">MprTime</a> time)
  </div>
  <div class="apiDetail">
<p>Decode a time value into a tokenized local time value.</p>
    <dl><dt><b>Description</b>:</dt><dd>Safe replacement for localtime. This call converts the time value to local time and formats the as a struct tm.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">timep</td><td>Pointer to a tm structure to hold the result.</td></tr>
    <tr><td class="param">time</td><td>Time to format.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ad52cfde22b75a620147b661f796ba8dc"></a>
<div class="api">
  <div class="prototype">
    void
    mprDecodeUniversalTime
(struct tm *timep, <a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="ref">MprTime</a> time)
  </div>
  <div class="apiDetail">
<p>Decode a time value into a tokenized UTC time structure.</p>
    <dl><dt><b>Description</b>:</dt><dd>Safe replacement for gmtime. This call converts the supplied time value to UTC time and parses the result into a tm structure.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">timep</td><td>Pointer to a tm structure to hold the result.</td></tr>
    <tr><td class="param">time</td><td>The time to format.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a7fe4c3fb94490eb462405d86f71514d7"></a>
<div class="api">
  <div class="prototype">
    void
    mprDedicateWorker
(<a href="#struct_mpr_worker" class="ref">MprWorker</a> *worker)
  </div>
  <div class="apiDetail">
<p>Dedicate a worker thread to a current real thread.</p>
This implements thread affinity and is required on some platforms where some APIs (waitpid on uClibc) cannot be called on a different thread
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">worker</td><td>Worker thread reference.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aac0f2dcab7c919a6b66ee992d8b087bf"></a>
<div class="api">
  <div class="prototype">
    void
    mprDefaultLogHandler
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *tags, int level, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *msg)
  </div>
  <div class="apiDetail">
<p>Default MPR log handler.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">tags</td><td>Descriptive tag words to classify this message.</td></tr>
    <tr><td class="param">level</td><td>Logging level for this message. The level is 0-5 with five being the most verbose.</td></tr>
    <tr><td class="param">msg</td><td>Message to log.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a411af02ac646daeb80cd31eb54606976"></a>
<div class="api">
  <div class="prototype">
    int
    mprDeletePath
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Delete a file.</p>
    <dl><dt><b>Description</b>:</dt><dd>Delete a file or directory.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>String containing the path to delete.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns zero if successful otherwise a negative MPR error code is returned.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a0fedb9de853c1233287840a4eab73f0a"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_hash" class="ref">MprHash</a> *
    mprDeserialize
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Deserialize a simple JSON string and return a hash of properties.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>JSON string. This must be an object with one-level of properties.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Hash of property values if successful, otherwise null.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a2ad1855cadbeed70b3dd6c6a677cc783"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_hash" class="ref">MprHash</a> *
    mprDeserializeInto
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="#struct_mpr_hash" class="ref">MprHash</a> *hash)
  </div>
  <div class="apiDetail">
<p>Deserialize a simple JSON string into the given hash object.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>JSON string. This must be an object with one-level of properties.</td></tr>
    <tr><td class="param">hash</td><td>Destination <a class="ref" href="#struct_mpr_hash">MprHash</a> object.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The supplied hash if successful. Otherwise null is returned.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a4f36e049582f33f7384fd5648db77a2a"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprDestroy
(void )
  </div>
  <div class="apiDetail">
<p>Destroy the MPR and all services using the MPR.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call terminates the MPR and all services. <br/><br/>
 An application initializes the MPR by calling <a class="ref" href="#mpr_8h_1a000f7f94708664e292b1bddeb69a7996">mprCreate</a>. This creates the <a class="ref" href="#struct_mpr">Mpr</a> object, the memory allocator, garbage collector and other services. An application exits by invoking <a class="ref" href="#mpr_8h_1a4f36e049582f33f7384fd5648db77a2a">mprDestroy</a> or by calling <a class="ref" href="#mpr_8h_1a2836549ee05ea1901a64a26e51f8ed86">mprShutdown</a> then <a class="ref" href="#mpr_8h_1a4f36e049582f33f7384fd5648db77a2a">mprDestroy</a>. <br/><br/>
 There are two styles of MPR applications with respect to shutdown: <br/><br/>
 1) Applications that have a dedicated service events thread. <br/><br/>
 2) Applications that call <a class="ref" href="#mpr_8h_1a205adaee3b45d0cc899afc89eb9f3b3d">mprServiceEvents</a> directly from their main program. <br/><br/>
 Applications that have a service events thread can call mprDestroy directly from their main program when ready to exit. Applications that call mprServiceEvents from their main program will typically have some other MPR thread call <a class="ref" href="#mpr_8h_1a2836549ee05ea1901a64a26e51f8ed86">mprShutdown</a> to initiate a shutdown sequence. This will stop accepting new requests or connections and when the application is idle, the <a class="ref" href="#mpr_8h_1a205adaee3b45d0cc899afc89eb9f3b3d">mprServiceEvents</a> routine will return and then the main program can call then call mprDestroy. <br/><br/>
 Once the shutdown conditions are satisfied, a thread executing <a class="ref" href="#mpr_8h_1a205adaee3b45d0cc899afc89eb9f3b3d">mprServiceEvents</a> will return from that API and then the application should call <a class="ref" href="#mpr_8h_1a4f36e049582f33f7384fd5648db77a2a">mprDestroy</a> and exit(). <br/><br/>
 If an application needs to tailor how it exits with respect to current requests, use <a class="ref" href="#mpr_8h_1a2836549ee05ea1901a64a26e51f8ed86">mprShutdown</a> first to specify a shutdown strategy.</dd></dl>
    <dl><dt>Returns:</dt><dd>True if the MPR can be destroyed. Returns false if the exit strategy MPR_EXIT_SAFE has been defined via <a class="ref" href="#mpr_8h_1a2836549ee05ea1901a64a26e51f8ed86">mprShutdown</a> and current requests have not completed within the exit timeout period defined by <a class="ref" href="#mpr_8h_1a278ee775a1c2e956d09a4683e778caea">mprSetExitTimeout</a>. In this case, the shutdown is cancelled and normal operations continue.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a9d65a430a441e5ea99ac123c64e6d750"></a>
<div class="api">
  <div class="prototype">
    void *
    mprDestroyCache
(<a href="#struct_mpr_cache" class="ref">MprCache</a> *cache)
  </div>
  <div class="apiDetail">
<p>Destroy a new cache object.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cache</td><td>The cache instance object returned from <a class="ref" href="#mpr_8h_1a723be1009e7b9cd130cc53f2f3545e94">mprCreateCache</a></td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa6cedd25447b88aa144bc50fdcec6951"></a>
<div class="api">
  <div class="prototype">
    void
    mprDestroyCmd
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd)
  </div>
  <div class="apiDetail">
<p>Destroy the command.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1afd35a965e3ebadc852b8b02aace7a08e"></a>
<div class="api">
  <div class="prototype">
    void
    mprDestroyDispatcher
(<a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher)
  </div>
  <div class="apiDetail">
<p>Disable a dispatcher from service events.</p>
This removes the dispatcher from any dispatcher queues and allows it to be garbage collected
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">dispatcher</td><td>Dispatcher to disable.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ae7af42e3a8ef70c3a9f6879b91e0697d"></a>
<div class="api">
  <div class="prototype">
    void
    mprDestroyWaitHandler
(<a href="#struct_mpr_wait_handler" class="ref">MprWaitHandler</a> *wp)
  </div>
  <div class="apiDetail">
<p>Destroy a wait handler.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Wait handler object.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a66cccaaaa550e9d2cf381ff8854c2d7a"></a>
<div class="api">
  <div class="prototype">
    void
    mprDisableCmdEvents
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, int channel)
  </div>
  <div class="apiDetail">
<p>Disable command I/O events.</p>
This disables events on a given channel
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    <tr><td class="param">channel</td><td>Channel number to close. Should be either MPR_CMD_STDIN, MPR_CMD_STDOUT or MPR_CMD_STDERR.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a457be50126337e42f1df6c30af9db510"></a>
<div class="api">
  <div class="prototype">
    void
    mprDisableFileBuffering
(<a href="#struct_mpr_file" class="ref">MprFile</a> *file)
  </div>
  <div class="apiDetail">
<p>Disable file buffering.</p>
    <dl><dt><b>Description</b>:</dt><dd>Disable any buffering of data when using the buffer.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">file</td><td>File instance returned from <a class="ref" href="#mpr_8h_1a7c2b7b9e2b2aa88b4d742f9b2c5ccfd7">mprOpenFile</a></td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a7562126cafba57260cd73634f1ee4aed"></a>
<div class="api">
  <div class="prototype">
    void
    mprDisconnectCmd
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd)
  </div>
  <div class="apiDetail">
<p>Disconnect a command its underlying I/O channels.</p>
This is used to prevent further I/O wait events while still preserving the
MprCmd
object
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5f9301dbcddf9d1a62b40c69bc67fe40"></a>
<div class="api">
  <div class="prototype">
    void
    mprDisconnectSocket
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)
  </div>
  <div class="apiDetail">
<p>Disconnect a socket by closing its underlying file descriptor.</p>
This is used to prevent further I/O wait events while still preserving the socket object
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1abe3cfb3803a928b435c9af5d46b61fb0"></a>
<div class="api">
  <div class="prototype">
    char *
    mprEmptyString
(void )
  </div>
  <div class="apiDetail">
<p>Reference to a permanent preallocated empty string.</p>
    <dl><dt>Returns:</dt><dd>An empty string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a2fd38e2aaf8e7c2a1aed39aa1005155e"></a>
<div class="api">
  <div class="prototype">
    void
    mprEnableCmdEvents
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, int channel)
  </div>
  <div class="apiDetail">
<p>Enable command I/O events.</p>
This enables events on a given channel
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    <tr><td class="param">channel</td><td>Channel number to close. Should be either MPR_CMD_STDIN, MPR_CMD_STDOUT or MPR_CMD_STDERR.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a39d49294df1ae6d358c30e958585e060"></a>
<div class="api">
  <div class="prototype">
    void
    mprEnableCmdOutputEvents
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> on)
  </div>
  <div class="apiDetail">
<p>Enable command I/O events for the command&apos;s STDOUT and STDERR channels.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    <tr><td class="param">on</td><td>Set to true to enable events. Set to false to disable.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac9e97afd0732f2d3612d911817357db5"></a>
<div class="api">
  <div class="prototype">
    void
    mprEnableContinuousEvent
(<a href="#struct_mpr_event" class="ref">MprEvent</a> *event, int enable)
  </div>
  <div class="apiDetail">
<p>Enable or disable an event being continous.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call will modify the continuous property for an event.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">event</td><td>Event object returned from <a class="ref" href="#mpr_8h_1abdf25e12b2bcc5c116599b639cc18d5c">mprCreateEvent</a></td></tr>
    <tr><td class="param">enable</td><td>Set to 1 to enable continous scheduling of the event.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a04cace2622f3cfe7e8e9ee32bffb12da"></a>
<div class="api">
  <div class="prototype">
    int
    mprEnableFileBuffering
(<a href="#struct_mpr_file" class="ref">MprFile</a> *file, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> maxSize)
  </div>
  <div class="apiDetail">
<p>Enable file buffering.</p>
    <dl><dt><b>Description</b>:</dt><dd>Enable data buffering when using the buffer.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">file</td><td>File instance returned from <a class="ref" href="#mpr_8h_1a7c2b7b9e2b2aa88b4d742f9b2c5ccfd7">mprOpenFile</a></td></tr>
    <tr><td class="param">size</td><td>Size to allocate for the buffer.</td></tr>
    <tr><td class="param">maxSize</td><td>Maximum size the data buffer can grow to.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a4e34537a9123922eb0bac5e9844c68b1"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprEnableGC
(<a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> on)
  </div>
  <div class="apiDetail">
<p>Enable or disable the garbage collector.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">on</td><td>Set to one to enable and zero to disable.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns one if the collector was previously enabled. Otherwise returns zero.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a76ee7ac0bfb59b23680a835d7ac03854"></a>
<div class="api">
  <div class="prototype">
    void
    mprEnableSocketEvents
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, int mask)
  </div>
  <div class="apiDetail">
<p>Enable socket events for a socket callback.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    <tr><td class="param">mask</td><td>Mask of events to enable.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a0800d67d2b12aff346dfae654edb23a9"></a>
<div class="api">
  <div class="prototype">
    char *
    mprEncode64
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Encode a string using base-46 encoding.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to encode.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Buffer containing the encoded string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a39db4cc703d330584cb7932a1a870eeb"></a>
<div class="api">
  <div class="prototype">
    char *
    mprEncode64Block
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
  </div>
  <div class="apiDetail">
<p>Encode buffer using base-46 encoding.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer to encode.</td></tr>
    <tr><td class="param">len</td><td>Length of the buffer to encode.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Buffer containing the encoded string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a97cfa9d651a30ee3699b050b4a3644e0"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprEprintf
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
  </div>
  <div class="apiDetail">
<p>Print a formatted message to the standard error channel.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is a secure replacement for fprintf(stderr).</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">fmt</td><td>Printf style format string.</td></tr>
    <tr><td class="param">...</td><td>Variable arguments to format.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The number of bytes written.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a3e8ec0097e4869fe9847da2c3b0eca48"></a>
<div class="api">
  <div class="prototype">
    void
    mprError
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
  </div>
  <div class="apiDetail">
<p>Log an error message.</p>
    <dl><dt><b>Description</b>:</dt><dd>Send an error message to the MPR debug logging subsystem. The message will be to the log handler defined by <a class="ref" href="#mpr_8h_1a834e7ceec5efa68d0d73eb45c3c69780">mprSetLogHandler</a>. It is up to the log handler to respond appropriately and log the message. This will invoke mprLog with a severity tag of &quot;error&quot;.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">fmt</td><td>Printf style format string. Variable number of arguments to.</td></tr>
    <tr><td class="param">...</td><td>Variable number of arguments for printf data.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a9ea6502e39da67e59f1f11f808ec02b3"></a>
<div class="api">
  <div class="prototype">
    char *
    mprEscapeCmd
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *cmd, int escChar)
  </div>
  <div class="apiDetail">
<p>Encode a string escaping typical command (shell) characters.</p>
    <dl><dt><b>Description</b>:</dt><dd>Encode a string escaping all dangerous characters that have meaning for the unix or MS-DOS command shells.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td>Command string to encode.</td></tr>
    <tr><td class="param">escChar</td><td>Escape character to use when encoding the command.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated string containing the escaped command.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ae4da13f321d8efb672ed9608402b037c"></a>
<div class="api">
  <div class="prototype">
    char *
    mprEscapeHtml
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *html)
  </div>
  <div class="apiDetail">
<p>Encode a string by escaping typical HTML characters.</p>
    <dl><dt><b>Description</b>:</dt><dd>Encode a string escaping all dangerous characters that have meaning in HTML documents.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">html</td><td>HTML content to encode.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated string containing the escaped HTML.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ade3a3fe123f14ed1d7b9c0e0ecf0e913"></a>
<div class="api">
  <div class="prototype">
    char *
    mprEscapeSQL
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *cmd)
  </div>
  <div class="apiDetail">
<p>Encode a string by escaping SQL special characters.</p>
    <dl><dt><b>Description</b>:</dt><dd>Encode a string escaping all dangerous characters that have meaning in SQL commands.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td>SQL command to encode.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated string containing the escaped SQL command.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a64c71c8b8c3abc909af87253b811da9e"></a>
<div class="api">
  <div class="prototype">
    int
    mprExpireCacheItem
(<a href="#struct_mpr_cache" class="ref">MprCache</a> *cache, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> expires)
  </div>
  <div class="apiDetail">
<p>Set the expiry date for a cache item.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cache</td><td>The cache instance object returned from <a class="ref" href="#mpr_8h_1a723be1009e7b9cd130cc53f2f3545e94">mprCreateCache</a></td></tr>
    <tr><td class="param">key</td><td>Cache item key.</td></tr>
    <tr><td class="param">expires</td><td>Time when the cache item will expire. If expires is zero, the item is immediately removed from the cache.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if the expiry is successfully updated. Return MPR_ERR_CANT_FIND if the cache item is not present in the cache.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac28276b68838d380698c4995fc9b1267"></a>
<div class="api">
  <div class="prototype">
    void
    mprFinalizeCmd
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd)
  </div>
  <div class="apiDetail">
<p>Finalize the writing of data to the command process.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a453b62a6659fc9fa4d041165dad7461e"></a>
<div class="api">
  <div class="prototype">
    void
    mprFlushBuf
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)
  </div>
  <div class="apiDetail">
<p>Flush the buffer contents.</p>
    <dl><dt><b>Description</b>:</dt><dd>Discard the buffer contents and reset the start end content pointers.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a957f3c3051214ee8f105047fee84bc11"></a>
<div class="api">
  <div class="prototype">
    int
    mprFlushFile
(<a href="#struct_mpr_file" class="ref">MprFile</a> *file)
  </div>
  <div class="apiDetail">
<p>Flush any buffered write data.</p>
    <dl><dt><b>Description</b>:</dt><dd>Write buffered write data and then reset the internal buffers.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">file</td><td>Pointer to an <a class="ref" href="#struct_mpr_file">MprFile</a> object returned via MprOpen.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1acd099834cea11479ab5a5ef542bfcaac"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprFlushSocket
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)
  </div>
  <div class="apiDetail">
<p>Flush a socket.</p>
    <dl><dt><b>Description</b>:</dt><dd>Flush any buffered data in a socket. Standard sockets do not use buffering and this call will do nothing. SSL sockets do buffer and calling mprFlushSocket will write pending written data.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A count of bytes actually written. Return a negative MPR error code on errors.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a127b29058e44088f4ce2088d7b0279b8"></a>
<div class="api">
  <div class="prototype">
    void
    mprFormatJsonName
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, int flags)
  </div>
  <div class="apiDetail">
<p>Format a JSON name into and output buffer.</p>
This handles quotes and backquotes
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td><a class="ref" href="#struct_mpr_buf">MprBuf</a> instance to store the output string.</td></tr>
    <tr><td class="param">name</td><td>Json name to format.</td></tr>
    <tr><td class="param">flags</td><td>Serialization flags. Supported flags include MPR_JSON_QUOTES to always wrap property names in quotes.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a840846c8502938332a1cb0ed6afcd0fa"></a>
<div class="api">
  <div class="prototype">
    void
    mprFormatJsonString
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value)
  </div>
  <div class="apiDetail">
<p>Format a string as a JSON string.</p>
This handles quotes and backquotes
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td><a class="ref" href="#struct_mpr_buf">MprBuf</a> instance to store the output string.</td></tr>
    <tr><td class="param">value</td><td>JSON string value to format.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a3518a6d456b78435f0e021bfdf81830a"></a>
<div class="api">
  <div class="prototype">
    void
    mprFormatJsonValue
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, int type, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value, int flags)
  </div>
  <div class="apiDetail">
<p>Format a value as a simple JSON string.</p>
This converts any JSON value to a string representation
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td><a class="ref" href="#struct_mpr_buf">MprBuf</a> instance to store the output string.</td></tr>
    <tr><td class="param">type</td><td>JSON type to format.</td></tr>
    <tr><td class="param">value</td><td>JSON value to format.</td></tr>
    <tr><td class="param">flags</td><td>Serialization flags. Supported flags include MPR_JSON_STRINGS to emit values as quoted strings.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a00f1d24d71418a0abafc2ff104f23609"></a>
<div class="api">
  <div class="prototype">
    char *
    mprFormatLocalTime
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, <a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="ref">MprTime</a> time)
  </div>
  <div class="apiDetail">
<p>Convert a time value to local time and format as a string.</p>
    <dl><dt><b>Description</b>:</dt><dd>Safe replacement for ctime.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">fmt</td><td>Time format string. See <a class="ref" href="#mpr_8h_1a57707eeefe16eca1ca909576c7ebd7e4">mprFormatUniversalTime</a> for time formats.</td></tr>
    <tr><td class="param">time</td><td>Time to format. Use mprGetTime to retrieve the current time.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The formatting time string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a4480b487cb113986815b59c1b4d5b2cf"></a>
<div class="api">
  <div class="prototype">
    char *
    mprFormatTm
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, struct tm *timep)
  </div>
  <div class="apiDetail">
<p>Format a time value as a local time.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call formats the time value supplied via timep.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">fmt</td><td>The time format to use. See <a class="ref" href="#mpr_8h_1a57707eeefe16eca1ca909576c7ebd7e4">mprFormatUniversalTime</a> for time formats.</td></tr>
    <tr><td class="param">timep</td><td>The time value to format.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The formatting time string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a57707eeefe16eca1ca909576c7ebd7e4"></a>
<div class="api">
  <div class="prototype">
    char *
    mprFormatUniversalTime
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, <a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="ref">MprTime</a> time)
  </div>
  <div class="apiDetail">
<p>Convert a time value to universal time and format as a string.</p>
    <dl><dt><b>Description</b>:</dt><dd>Format a time string. This uses strftime if available and so the supported formats vary from platform to platform. Strftime should supports some of these these formats described below.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">time</td><td>Time to format. Use mprGetTime to retrieve the current time.</td></tr>
    <tr><td class="param">fmt</td><td>Time format string <br/>
 A ... full weekday name (Monday) <br/>
 a ... abbreviated weekday name (Mon) <br/>
 B ... full month name (January) <br/>
 b ... abbreviated month name (Jan) <br/>
 C ... century. Year / 100. (0-N) <br/>
 c ... standard date and time representation <br/>
 D ... date (m/d/y) <br/>
 d ... day-of-month (01-31) <br/>
 e ... day-of-month with a leading space if only one digit ( 1-31) <br/>
 f ... milliseconds <br/>
 F ... same as Y-m-d <br/>
 H ... hour (24 hour clock) (00-23) <br/>
 h ... same as b <br/>
 I ... hour (12 hour clock) (01-12) <br/>
 j ... day-of-year (001-366) <br/>
 k ... hour (24 hour clock) (0-23) <br/>
 l ... the hour (12-hour clock) as a decimal number (1-12); single digits are preceded by a blank. <br/>
 M ... minute (00-59) <br/>
 m ... month (01-12) <br/>
 n ... a newline <br/>
 P ... lower case am / pm <br/>
 p ... AM / PM <br/>
 R ... same as H:M <br/>
 r ... same as H:M:S p <br/>
 S ... second (00-59) <br/>
 s ... seconds since epoch <br/>
 T ... time (H:M:S) <br/>
 t ... a tab. <br/>
 U ... week-of-year, first day sunday (00-53) <br/>
 u ... the weekday (Monday as the first day of the week) as a decimal number (1-7). <br/>
 v ... is equivalent to `<lsquo/>e-b-Y<rsquo/>&apos;. <br/>
 W ... week-of-year, first day monday (00-53) <br/>
 w ... weekday (0-6, sunday is 0) <br/>
 X ... standard time representation <br/>
 x ... standard date representation <br/>
 Y ... year with century <br/>
 y ... year without century (00-99) <br/>
 Z ... timezone name <br/>
 z ... offset from UTC (-hhmm or +hhmm) <br/>
 %+ ... national representation of the date and time (the format is similar to that produced by date(1)). <br/>
 %% ... percent sign <br/><br/>
 Some platforms may also support the following format extensions: <br/>
 E* ... POSIX locale extensions. Where &quot;*&quot; is one of the characters: c, C, x, X, y, Y. <br/>
 G ... a year as a decimal number with century. This year is the one that contains the greater part of the week (Monday as the first day of the week). <br/>
 g ... the same year as in `<lsquo/>G<rsquo/>&apos;, but as a decimal number without century (00-99). <br/>
 O* ... POSIX locale extensions. Where &quot;*&quot; is one of the characters: d, e, H, I, m, M, S, u, U, V, w, W, y. Additionly OB implemented to represent alternative months names (used standalone, without day mentioned). <br/>
 V ... the week number of the year (Monday as the first day of the week) as a decimal number (01-53). If the week containing January 1 has four or more days in the new year, then it is week 1; otherwise it is the last week of the previous year, and the next week is week 1. <br/><br/>
Useful formats: <br/>
 RFC822: &quot;%a, %d %b %Y %H:%M:%S %Z &quot;Fri, 07 Jan 2003 12:12:21 PDT&quot;
        \n
    &quot;T F &quot;12:12:21 2007-01-03&quot; <br/>
 &quot;%v &quot;07-Jul-2003&quot;
        \n
    RFC3399: &quot;FTTZ&quot; &quot;1985-04-12T23:20:50.52Z" which is April 12 1985, 23:20.50 and 52 msec.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The formatting time string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac291f492ca21c6576cf5cfcb1662f0c2"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> ssize
    mprFprintf
(struct MprFile *file, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
  </div>
  <div class="apiDetail">
<p>Print a formatted message to a file descriptor.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is a replacement for fprintf as part of the safe string MPR library. It minimizes memory use and uses a file descriptor instead of a File pointer.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">file</td><td><a class="ref" href="#struct_mpr_file">MprFile</a> object returned via <a class="ref" href="#mpr_8h_1a7c2b7b9e2b2aa88b4d742f9b2c5ccfd7">mprOpenFile</a></td></tr>
    <tr><td class="param">fmt</td><td>Printf style format string.</td></tr>
    <tr><td class="param">...</td><td>Variable arguments to format.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The number of bytes written.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a748a0f879d3b5ce8cb8eb23b01392552"></a>
<div class="api">
  <div class="prototype">
    int
    mprGC
(int flags)
  </div>
  <div class="apiDetail">
<p>Collect garbage.</p>
    <dl><dt><b>Description</b>:</dt><dd>Initiates garbage collection to free unreachable memory blocks. It is normally not required for users to invoke this routine as the garbage collector will be scheduled as required. If the MPR_GC_NO_BLOCK is not specified, this routine yields to the garbage collector by calling <a class="ref" href="#mpr_8h_1af140a2fda18b2e8461236cc44c0a2cc4">mprYield</a>. Callers must retain all required memory.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">flags</td><td>Flags to control the collection. Set flags to MPR_GC_FORCE to force a collection. Set to MPR_GC_DEFAULT to perform a conditional sweep where the sweep is only performed if there is sufficient garbage to warrant a collection. Set to MPR_GC_NO_BLOCK to run GC if necessary and return without yielding. Use MPR_GC_COMPLETE to force a GC and wait until the GC cycle fully completes including the sweep phase.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The number of blocks freed on the last GC sweep. If using MPR_GC_NO_BLOCK, this may be the result from a prior GC sweep.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a080fbccb95ae7cf32175d3218b903389"></a>
<div class="api">
  <div class="prototype">
    char *
    mprGetAbsPath
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Convert a path to an absolute path.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get an absolute (canonical) equivalent representation of a path. On windows this path will have back-slash directory separators and will have a drive specifier. On Cygwin, the path will be a Cygwin style path with forward-slash directory specifiers and without a drive specifier. If the path is outside the cygwin filesystem (outside c:/cygwin), the path will have a /cygdrive/DRIVE prefix. To get a windows style path on *NIX, use mprGetWinPath.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path to examine.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An absolute path.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a2ad40e5d26b04cff98854958a6584170"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprGetActiveCmdCount
(void )
  </div>
  <div class="apiDetail">
<p>Get the count of active commands.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is thread-safe with respect to MPR-&gt;state.</dd></dl>
    <dl><dt>Returns:</dt><dd>Count of running commands.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a7d3003f3b50a50276f8643e51860e5c3"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    mprGetAppDir
(void )
  </div>
  <div class="apiDetail">
<p>Get the application directory.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get the directory containing the application executable.</dd></dl>
    <dl><dt>Returns:</dt><dd>A string containing the application directory.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ad74c6620549f5cc262ab0e19f7b89e06"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    mprGetAppName
(void )
  </div>
  <div class="apiDetail">
<p>Get the application name defined via mprSetAppName.</p>
    <dl><dt>Returns:</dt><dd>The one-word lower case application name defined via mprSetAppName.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a1a448850bac399919424976a69e0ac87"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    mprGetAppPath
(void )
  </div>
  <div class="apiDetail">
<p>Get the application executable path.</p>
    <dl><dt>Returns:</dt><dd>A string containing the application executable path.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a18dfbba3def279be7d964caf6406aa28"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    mprGetAppTitle
(void )
  </div>
  <div class="apiDetail">
<p>Get the application title string.</p>
    <dl><dt>Returns:</dt><dd>A string containing the application title string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac8a0abeb29a70859022071c5d1d9625a"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    mprGetAppVersion
(void )
  </div>
  <div class="apiDetail">
<p>Get the application version string.</p>
    <dl><dt>Returns:</dt><dd>A string containing the application version string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a142b9eecd08dac10c50cd705045ddb80"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprGetBlockFromBuf
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, char *blk, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> count)
  </div>
  <div class="apiDetail">
<p>Get a block of data from the buffer.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get a block of data from the buffer start and advance the start position. If the requested length is greater than the available buffer content, then return whatever data is available.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    <tr><td class="param">blk</td><td>Destination block for the read data.</td></tr>
    <tr><td class="param">count</td><td>Count of bytes to read from the buffer.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The count of bytes read into the block or -1 if the buffer is empty.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a4c9028aba8f82b48191035aa3a191d81"></a>
<div class="api">
  <div class="prototype">
    <a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a>
    mprGetBlockSize
(<a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr)
  </div>
  <div class="apiDetail">
<p>Get the allocated size of a memory block.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ptr</td><td>Any memory allocated by mprAlloc.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The block size in bytes.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a10dfa79a5b91b7bc543a806404e5ee07"></a>
<div class="api">
  <div class="prototype">
    char *
    mprGetBuf
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)
  </div>
  <div class="apiDetail">
<p>Get the origin of the buffer content storage.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get a pointer to the start of the buffer content storage. This is always and allocated block.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A pointer to the buffer content storage.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a500adc201f3219c2ce8d5f79aafabf68"></a>
<div class="api">
  <div class="prototype">
    char *
    mprGetBufEnd
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)
  </div>
  <div class="apiDetail">
<p>Get a reference to the end of the buffer contents.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get a pointer to the location immediately after the end of the buffer contents.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Pointer to the end of the buffer data contents. Points to the location one after the last data byte.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa543b610b67691faf917b4b79229fc34"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprGetBufLength
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)
  </div>
  <div class="apiDetail">
<p>Get the buffer content length.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get the length of the buffer contents. This is not the same as the buffer size which may be larger.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The length of the content stored in the buffer in bytes.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a2791daeb72ae2e3f455250dfba72aa67"></a>
<div class="api">
  <div class="prototype">
    <a href="#mpr_8h_1ac1eae8096b0311d63a3fba54015bf1b9" class="ref">MprBufProc</a>
    mprGetBufRefillProc
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)
  </div>
  <div class="apiDetail">
<p>Get the buffer refill procedure.</p>
    <dl><dt><b>Description</b>:</dt><dd>Return the buffer refill callback function.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The refill call back function if defined.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a0cbdbaf59392b9f7a77997c450117c87"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprGetBufSize
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)
  </div>
  <div class="apiDetail">
<p>Get the current size of the buffer content storage.</p>
    <dl><dt><b>Description</b>:</dt><dd>This returns the size of the memory block allocated for storing the buffer contents.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The size of the buffer content storage.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a31a2c76bb862de4e47ffb2231b106c98"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprGetBufSpace
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)
  </div>
  <div class="apiDetail">
<p>Get the space available to store content.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get the number of bytes available to store content in the buffer.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The number of bytes available.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a1e6d26702f1d5cf253c623e9e798df65"></a>
<div class="api">
  <div class="prototype">
    char *
    mprGetBufStart
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)
  </div>
  <div class="apiDetail">
<p>Get the start of the buffer contents.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get a pointer to the start of the buffer contents. Use mprGetBufLength to determine the length of the content. Use mprGetBufEnd to get a pointer to the location after the end of the content.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Pointer to the start of the buffer data contents.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a92854bbee90e9a17e0e9a4718300b53f"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprGetBusyWorkerCount
(void )
  </div>
  <div class="apiDetail">
<p>Get the count of workers in the busy queue.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is thread-safe with respect to MPR-&gt;state.</dd></dl>
    <dl><dt>Returns:</dt><dd>Count of workers in the busy queue.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a4eecd5e609a315224aed035c3351d836"></a>
<div class="api">
  <div class="prototype">
    void
    mprGetCacheStats
(<a href="#struct_mpr_cache" class="ref">MprCache</a> *cache, int *numKeys, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> *mem)
  </div>
  <div class="apiDetail">
<p>Get the Cache statistics.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cache</td><td>The cache instance object returned from <a class="ref" href="#mpr_8h_1a723be1009e7b9cd130cc53f2f3545e94">mprCreateCache</a></td></tr>
    <tr><td class="param">numKeys</td><td>Number of keys currently stored.</td></tr>
    <tr><td class="param">mem</td><td>Memory in use to store keys.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af128b71005bdd12507110e1f21b483d4"></a>
<div class="api">
  <div class="prototype">
    int
    mprGetCharFromBuf
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)
  </div>
  <div class="apiDetail">
<p>Get a character from the buffer.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get the next byte from the buffer start and advance the start position.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The character or -1 if the buffer is empty.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ae85d70142c3176988a699d77d0d7db30"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_buf" class="ref">MprBuf</a> *
    mprGetCmdBuf
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, int channel)
  </div>
  <div class="apiDetail">
<p>Get the underlying buffer for a channel.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    <tr><td class="param">channel</td><td>Channel number to close. Should be either MPR_CMD_STDIN, MPR_CMD_STDOUT or MPR_CMD_STDERR.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A reference to the <a class="ref" href="#struct_mpr_buf">MprBuf</a> buffer structure.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af75f9ee1ad6ce783f18263761fde73c3"></a>
<div class="api">
  <div class="prototype">
    int
    mprGetCmdExitStatus
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd)
  </div>
  <div class="apiDetail">
<p>Get the command exit status.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Status If the command has exited, a status between 0 and 255 is returned. Otherwise, a negative error code is returned.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ab286ce3b057579a16b84ec56997ae63f"></a>
<div class="api">
  <div class="prototype">
    int
    mprGetCmdFd
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, int channel)
  </div>
  <div class="apiDetail">
<p>Get the underlying file descriptor for an I/O channel.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    <tr><td class="param">channel</td><td>Channel number to close. Should be either MPR_CMD_STDIN, MPR_CMD_STDOUT or MPR_CMD_STDERR.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The file descriptor.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a06742ab6e80eb33573632ca502ae2c16"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprGetCmdlineLogging
(void )
  </div>
  <div class="apiDetail">
<p>Get if command line logging is being used.</p>
    <dl><dt><b>Description</b>:</dt><dd>Logging may be initiated by invoking an MPR based program with a &quot;&mdash;log&quot; switch. This API assists programs to tell the MPR that command line logging has been used.</dd></dl>
    <dl><dt>Returns:</dt><dd>True if command line logging is in use.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a7cfff7f39e0ea544eded730c1aee2306"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a151d6b4fc026bbbf0b057d78f2543f50" class="ref">uint64</a>
    mprGetCPU
(void )
  </div>
  <div class="apiDetail">
<p>Return the process CPU usage.</p>
    <dl><dt>Returns:</dt><dd>The total number of ticks of cpu usage since process tart.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a9db7204c54785784352bb1ee492fadab"></a>
<div class="api">
  <div class="prototype">
    <a href="#mpr_8h_1a7c5ca1c1ea9197509c0e60d9f6a8fed7" class="ref">MprOsThread</a>
    mprGetCurrentOsThread
(void )
  </div>
  <div class="apiDetail">
<p>Get the O/S thread.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get the O/S thread ID for the currently executing thread.</dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a platform specific O/S thread ID. On Unix, this is a pthread reference. On other systems it is a thread integer value.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ab907f78a9b83d696751f6cbb61166e22"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    mprGetCurrentPath
(void )
  </div>
  <div class="apiDetail">
<p>Return the current working directory.</p>
    <dl><dt>Returns:</dt><dd>Returns an allocated string with the current working directory as an absolute path.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a9b441f06f8eae7eaebcba6d35bfa3a48"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_thread" class="ref">MprThread</a> *
    mprGetCurrentThread
(void )
  </div>
  <div class="apiDetail">
<p>Get the currently executing thread.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get the thread object for the currently executing O/S thread.</dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a thread object representing the current O/S thread.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a3cba09b91b830934fbe9deee2be61f49"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    mprGetCurrentThreadName
(void )
  </div>
  <div class="apiDetail">
<p>Return the name of the current thread.</p>
    <dl><dt>Returns:</dt><dd>A static thread name.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a14edad55ccffaf94ae988e36ac793675"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_worker" class="ref">MprWorker</a> *
    mprGetCurrentWorker
(void )
  </div>
  <div class="apiDetail">
<p>Get the worker object if the current thread is actually a worker thread.</p>
    <dl><dt>Returns:</dt><dd>A worker thread object if the thread is a worker thread. Otherwise, NULL.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a07a8f789f0873dff5de3a4e3e51b7956"></a>
<div class="api">
  <div class="prototype">
    char *
    mprGetDate
(char *fmt)
  </div>
  <div class="apiDetail">
<p>Get a string representation of the current date/time.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get the current date/time as a string according to the given format.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">fmt</td><td>Date formatting string. See strftime for acceptable date format specifiers. If null, then this routine uses the <a class="ref" href="#mpr_8h_1ac9fb49d5056d0731ac706c507d31d4e2">MPR_DEFAULT_DATE</a> format.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated date string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aad943db137f5906883e08af68d3436b8"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprGetDebugMode
(void )
  </div>
  <div class="apiDetail">
<p>Get the debug mode.</p>
    <dl><dt><b>Description</b>:</dt><dd>Returns whether the debug mode is enabled. Some modules observe debug mode and disable timeouts and timers so that single-step debugging can be used.</dd></dl>
    <dl><dt>Returns:</dt><dd>Returns true if debug mode is enabled, otherwise returns false.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a58f8c69c9dd399c2e17be36dd5412e88"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *
    mprGetDispatcher
(void )
  </div>
  <div class="apiDetail">
<p>Get the MPR primary dispatcher.</p>
    <dl><dt>Returns:</dt><dd>The MPR dispatcher object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af885fc9c79401476c95bfdb53996efdd"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    mprGetDomainName
(void )
  </div>
  <div class="apiDetail">
<p>Get the application domain name string.</p>
    <dl><dt>Returns:</dt><dd>A string containing the application domain name string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a1f88b37382ba7d2e48289415df0383ea"></a>
<div class="api">
  <div class="prototype">
    <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a>
    mprGetElapsedTicks
(<a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> mark)
  </div>
  <div class="apiDetail">
<p>Get the elapsed time since a ticks mark.</p>
Create the ticks mark with
mprGetTicks()
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">mark</td><td>Starting time stamp.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The time elapsed since the mark was taken.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a56c79ce10b54876dc9488694039a3ea9"></a>
<div class="api">
  <div class="prototype">
    <a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="ref">MprTime</a>
    mprGetElapsedTime
(<a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="ref">MprTime</a> mark)
  </div>
  <div class="apiDetail">
<p>Get the elapsed time since a starting time mark.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">mark</td><td>Starting time created via <a class="ref" href="#mpr_8h_1a874f0ee5e3ec4ea75e4b6c5ac75e83ae">mprGetTime()</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The time elapsed since the mark was taken.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1adb6c109b9a562ddbba0fcc9acb15c862"></a>
<div class="api">
  <div class="prototype">
    int
    mprGetEndian
(void )
  </div>
  <div class="apiDetail">
<p>Return the endian byte ordering for the application.</p>
    <dl><dt>Returns:</dt><dd>MPR_LITTLE_ENDIAN or MPR_BIG_ENDIAN.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aeecae95080f23d6052020b6f16ec7b92"></a>
<div class="api">
  <div class="prototype">
    int
    mprGetError
(void )
  </div>
  <div class="apiDetail">
<p>Return the error code for the most recent system or library operation.</p>
    <dl><dt><b>Description</b>:</dt><dd>Returns an error code from the most recent system call. This will be mapped to be either a POSIX error code or an MPR error code.</dd></dl>
    <dl><dt>Returns:</dt><dd>The mapped error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a85ab494f065b00d321a75512ebdc1219"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a>
    mprGetEventMark
(<a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher)
  </div>
  <div class="apiDetail">
<p>Get an event mark for a dispatcher.</p>
    <dl><dt><b>Description</b>:</dt><dd>An event mark indicates a point in time for a dispatcher. Event marks are incremented for each event serviced. This API is used with <a class="ref" href="#mpr_8h_1aa523c291209f9419ad27f8b7be4e231d">mprWaitForEvent</a> to supply an event mark so that mprWaitForEvent can detect if any events have been serviced since the mark was taken. This is important so that mprWaitForEvent will not miss events that occur before or while invoking <a class="ref" href="#mpr_8h_1aa523c291209f9419ad27f8b7be4e231d">mprWaitForEvent</a></dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">dispatcher</td><td>Event dispatcher.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Event mark 64 bit integer.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a6dcbec55f8e4ba71d582bf0308ee7acd"></a>
<div class="api">
  <div class="prototype">
    int
    mprGetExitStatus
(void )
  </div>
  <div class="apiDetail">
<p>Get the exit status.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get the exit status set via <a class="ref" href="#mpr_8h_1a2836549ee05ea1901a64a26e51f8ed86">mprShutdown</a> May be called after <a class="ref" href="#mpr_8h_1a4f36e049582f33f7384fd5648db77a2a">mprDestroy</a></dd></dl>
    <dl><dt>Returns:</dt><dd>The proposed application exit status.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aef84e97dcc3d31210a7a234a03ac3366"></a>
<div class="api">
  <div class="prototype">
    int
    mprGetFileChar
(<a href="#struct_mpr_file" class="ref">MprFile</a> *file)
  </div>
  <div class="apiDetail">
<p>Read a character from the file.</p>
    <dl><dt><b>Description</b>:</dt><dd>Read a single character from the file and advance the read position.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">file</td><td>Pointer to an <a class="ref" href="#struct_mpr_file">MprFile</a> object returned via MprOpen.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>If successful, return the character just read. Otherwise return a negative MPR error code. End of file is signified by reading 0.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af103e93995d60cca6b94f15b2e77e19f"></a>
<div class="api">
  <div class="prototype">
    int
    mprGetFileFd
(<a href="#struct_mpr_file" class="ref">MprFile</a> *file)
  </div>
  <div class="apiDetail">
<p>Get the file descriptor for a file.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">file</td><td>File object returned via <a class="ref" href="#mpr_8h_1a7c2b7b9e2b2aa88b4d742f9b2c5ccfd7">mprOpenFile</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An integer O/S file descriptor.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a437b7eb30b31d38fcedef0aa8617edcc"></a>
<div class="api">
  <div class="prototype">
    <a href="#mpr_8h_1a87e9f435008723c7b1489af1944c6e20" class="ref">MprOff</a>
    mprGetFilePosition
(<a href="#struct_mpr_file" class="ref">MprFile</a> *file)
  </div>
  <div class="apiDetail">
<p>Return the current file position.</p>
    <dl><dt><b>Description</b>:</dt><dd>Return the current read/write file position.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">file</td><td>A file object returned from <a class="ref" href="#mpr_8h_1a7c2b7b9e2b2aa88b4d742f9b2c5ccfd7">mprOpenFile</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The current file offset position if successful. Returns a negative MPR error code on errors.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a29b58b84303a5345e9cc69bb320fc500"></a>
<div class="api">
  <div class="prototype">
    <a href="#mpr_8h_1a87e9f435008723c7b1489af1944c6e20" class="ref">MprOff</a>
    mprGetFileSize
(<a href="#struct_mpr_file" class="ref">MprFile</a> *file)
  </div>
  <div class="apiDetail">
<p>Get the size of the file.</p>
    <dl><dt><b>Description</b>:</dt><dd>Return the current file size.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">file</td><td>A file object returned from <a class="ref" href="#mpr_8h_1a7c2b7b9e2b2aa88b4d742f9b2c5ccfd7">mprOpenFile</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The current file size if successful. Returns a negative MPR error code on errors.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a34cb920bcebf2bf6559a50b68788f74b"></a>
<div class="api">
  <div class="prototype">
    void *
    mprGetFirstItem
(<a href="#struct_mpr_list" class="ref">MprList</a> *list)
  </div>
  <div class="apiDetail">
<p>Get the first item in the list.</p>
    <dl><dt><b>Description</b>:</dt><dd>Returns the value of the first item in the list. After calling this routine, the remaining list items can be walked using mprGetNextItem.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">list</td><td>List pointer returned from mprCreateList.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a0604f7e2cf28a39f0fa608f2365ae426"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_key" class="ref">MprKey</a> *
    mprGetFirstKey
(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table)
  </div>
  <div class="apiDetail">
<p>Return the first symbol in a symbol entry.</p>
    <dl><dt><b>Description</b>:</dt><dd>Prepares for walking the contents of a symbol table by returning the first entry in the symbol table.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">table</td><td>Symbol table returned via mprCreateHash.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Pointer to the first entry in the symbol table.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a52796d1fca3bdd2ff93a0641d5ce4ea4"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    mprGetFirstPathSeparator
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Get the first path separator in a path.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path to examine.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a reference to the first path separator in the given path.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a2c078b228b88412f5d922e45c9002c5c"></a>
<div class="api">
  <div class="prototype">
    int
    mprGetHashLength
(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table)
  </div>
  <div class="apiDetail">
<p>Return the count of symbols in a symbol entry.</p>
    <dl><dt><b>Description</b>:</dt><dd>Returns the number of symbols currently existing in a symbol table.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">table</td><td>Symbol table returned via mprCreateHash.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Integer count of the number of entries.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a593854e3645e9587bca0daf66bccddf4"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a151d6b4fc026bbbf0b057d78f2543f50" class="ref">uint64</a>
    mprGetHiResTicks
(void )
  </div>
  <div class="apiDetail">
<p>Get the CPU tick count.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get the current CPU tick count. This is a system dependant high resolution timer. On some systems, this returns time in nanosecond resolution.</dd></dl>
    <dl><dt>Returns:</dt><dd>The CPU time in ticks. Will return the system time if CPU ticks are not available.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a846bf5ed140accc0a52f33919a32e0da"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    mprGetHostName
(void )
  </div>
  <div class="apiDetail">
<p>Get the application host name string.</p>
    <dl><dt>Returns:</dt><dd>A string containing the application host name string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a3657b2c77af0992419809b0d97aa05db"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    mprGetIpAddr
(void )
  </div>
  <div class="apiDetail">
<p>Get the application IP address string.</p>
    <dl><dt>Returns:</dt><dd>A string containing the application IP address string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a7fd7e14f0616cb9802638d654678bf0b"></a>
<div class="api">
  <div class="prototype">
    void *
    mprGetItem
(<a href="#struct_mpr_list" class="ref">MprList</a> *list, int index)
  </div>
  <div class="apiDetail">
<p>Get an list item.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get an list item specified by its index.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">list</td><td>List pointer returned from mprCreateList.</td></tr>
    <tr><td class="param">index</td><td>Item index into the list. Indexes have a range from zero to the lenghth of the list - 1.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a559d9a940422ebfa981b1cf51f72020d"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    mprGetJson
(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key)
  </div>
  <div class="apiDetail">
<p>Get a JSON key and return a string value.</p>
    <dl><dt><b>Description</b>:</dt><dd>This routine is useful to querying JSON property or object values. If the supplied key is an array or object, or matches more than one property, the result is a string representation of the array or object.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">obj</td><td>Parsed JSON object returned by mprParseJson.</td></tr>
    <tr><td class="param">key</td><td>Property name to search for. This may include &quot;.&quot;. For example: &quot;settings.mode&quot;. See <a class="ref" href="#mpr_8h_1a870629694aae99d61e7c42724b687177">mprQueryJson</a> for a full description of key formats.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A string representation of the selected properties. If a single property is selected and its value is a string, that is returned. If the selected property is an array or object, or it matches more than one property, the result is a JSON string representation. If nothing is matched, null is returned.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a96b8f4d7945990fc3f2a942af43cab32"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprGetJsonLength
(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj)
  </div>
  <div class="apiDetail">
<p>Get the number of child properties in a JSON object.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">obj</td><td>Parsed JSON object returned by mprParseJson.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The number of direct dependent child properties.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a05e2cff598f473615cb1ef4b82dcfd31"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_json" class="ref">MprJson</a> *
    mprGetJsonObj
(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key)
  </div>
  <div class="apiDetail">
<p>Get a parsed JSON object for a key value.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">obj</td><td>Parsed JSON object returned by mprJsonParser.</td></tr>
    <tr><td class="param">key</td><td>Property name to search for. This may include &quot;.&quot;. For example: &quot;settings.mode&quot;. See <a class="ref" href="#mpr_8h_1a870629694aae99d61e7c42724b687177">mprQueryJson</a> for a full description of key formats.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The property value as an object, otherwise NULL if not found or not the correct type.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a6d6062cbf99035bfb7f9f3667342506a"></a>
<div class="api">
  <div class="prototype">
    void *
    mprGetKey
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key)
  </div>
  <div class="apiDetail">
<p>Get a key value.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">key</td><td>String key value.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ad52b353a178af2cee98aedfef0aa7988"></a>
<div class="api">
  <div class="prototype">
    void *
    mprGetLastItem
(<a href="#struct_mpr_list" class="ref">MprList</a> *list)
  </div>
  <div class="apiDetail">
<p>Get the last item in the list.</p>
    <dl><dt><b>Description</b>:</dt><dd>Returns the value of the last item in the list. After calling this routine, the remaining list items can be walked using mprGetPrevItem.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">list</td><td>List pointer returned from mprCreateList.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac47331b3442493d84405d32ffcb98aba"></a>
<div class="api">
  <div class="prototype">
    int
    mprGetListCapacity
(<a href="#struct_mpr_list" class="ref">MprList</a> *list)
  </div>
  <div class="apiDetail">
<p>Get the current capacity of the list.</p>
    <dl><dt><b>Description</b>:</dt><dd>Returns the capacity of the list. This will always be equal to or greater than the list length.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">list</td><td>List pointer returned from mprCreateList.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a4c19ca9f47bf98e133716c174f225f54"></a>
<div class="api">
  <div class="prototype">
    int
    mprGetListLength
(<a href="#struct_mpr_list" class="ref">MprList</a> *list)
  </div>
  <div class="apiDetail">
<p>Get the number of items in the list.</p>
    <dl><dt><b>Description</b>:</dt><dd>Returns the number of items in the list. This will always be less than or equal to the list capacity.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">list</td><td>List pointer returned from mprCreateList.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa06509c35e52b3873c34586d6986a343"></a>
<div class="api">
  <div class="prototype">
    void struct MprFile *
    mprGetLogFile
(void )
  </div>
  <div class="apiDetail">
<p>Get the log file object.</p>
    <dl><dt><b>Description</b>:</dt><dd>Returns the <a class="ref" href="#struct_mpr_file">MprFile</a> object used for logging.</dd></dl>
    <dl><dt>Returns:</dt><dd>An <a class="ref" href="#struct_mpr_file">MprFile</a> object for logging.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a793de5b45b6675f852c98d3127e5dc24"></a>
<div class="api">
  <div class="prototype">
    <a href="#mpr_8h_1a8fdb97b78014d2a084a4747a35b3235a" class="ref">MprLogHandler</a>
    mprGetLogHandler
(void )
  </div>
  <div class="apiDetail">
<p>Get the current MPR debug log handler.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get the log handler defined via <a class="ref" href="#mpr_8h_1a834e7ceec5efa68d0d73eb45c3c69780">mprSetLogHandler</a></dd></dl>
    <dl><dt>Returns:</dt><dd>A function of the signature <a class="ref" href="#mpr_8h_1a8fdb97b78014d2a084a4747a35b3235a">MprLogHandler</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a4cfc9b704aa9db3e8f46e07a6eb7119a"></a>
<div class="api">
  <div class="prototype">
    int
    mprGetLogLevel
(void )
  </div>
  <div class="apiDetail">
<p>Get the current logging level.</p>
    <dl><dt>Returns:</dt><dd>The current log level.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ae4ec7b83f3094b71025fe605a1bcf2dc"></a>
<div class="api">
  <div class="prototype">
    int
    mprGetMaxWorkers
(void )
  </div>
  <div class="apiDetail">
<p>Get the maximum count of worker pool threads Get the maximum limit of worker pool threads.</p>
    <dl><dt>Returns:</dt><dd>The maximum count of worker pool threads.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a8962a0650385fc6a6efcc8b1d606fe47"></a>
<div class="api">
  <div class="prototype">
    char *
    mprGetMD5
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Get an MD5 checksum.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to examine.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated MD5 checksum string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5c59cd24665cae7c85b0578f2fb6b94a"></a>
<div class="api">
  <div class="prototype">
    char *
    mprGetMD5WithPrefix
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *prefix)
  </div>
  <div class="apiDetail">
<p>Get an MD5 checksum with optional prefix string and buffer length.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer to checksum.</td></tr>
    <tr><td class="param">len</td><td>Size of the buffer.</td></tr>
    <tr><td class="param">prefix</td><td>String prefix to insert at the start of the result.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated MD5 checksum string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a279d76fb52ed630587e1e97612172a5c"></a>
<div class="api">
  <div class="prototype">
    <a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a>
    mprGetMem
(void )
  </div>
  <div class="apiDetail">
<p>Return the amount of memory currently used by the application.</p>
On Unix, this returns the total application memory size including code, stack, data and heap. On Windows, VxWorks and other operatings systems, it returns the amount of allocated heap memory
    <dl><dt>Returns:</dt><dd>The amount of memory used by the application in bytes.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a99dc8d54f9cf15941879227b4029e8b4"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_mem_stats" class="ref">MprMemStats</a> *
    mprGetMemStats
(void )
  </div>
  <div class="apiDetail">
<p>Return the current allocation memory statistics block.</p>
    <dl><dt>Returns:</dt><dd>A reference to the allocation memory statistics. Do not modify its contents.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a0546da53b26c8a264b778b07461746c0"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    mprGetMimeProgram
(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *mimeType)
  </div>
  <div class="apiDetail">
<p>Get the mime type program for a given mimeType.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">table</td><td>type hash table returned by <a class="ref" href="#mpr_8h_1aa2c27762b461480e0fa9e8e5090e0d66">mprCreateMimeTypes</a></td></tr>
    <tr><td class="param">mimeType</td><td>Mime type to update.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The program name associated with this mime type.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a0e9b22f07aca1f18bcad2e73147a5de3"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    mprGetModuleSearchPath
(void )
  </div>
  <div class="apiDetail">
<p>Get the module search path.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get the directory search path used by the MPR when loading dynamic modules. This is a colon separated (or semicolon on Windows) set of directories.</dd></dl>
    <dl><dt>Returns:</dt><dd>The module search path.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1add3d2fbe6368f4e0eecb870c22e96d32"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr" class="ref">Mpr</a> *
    mprGetMpr
(void )
  </div>
  <div class="apiDetail">
<p>Return the MPR control instance.</p>
    <dl><dt><b>Description</b>:</dt><dd>Return the MPR singleton control object.</dd></dl>
    <dl><dt>Returns:</dt><dd>The MPR control object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a329900c5d80145667270dbe8e471b011"></a>
<div class="api">
  <div class="prototype">
    char *
    mprGetNativePath
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Get a path formatted according to the native O/S conventions.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get an equivalent absolute path formatted using the directory separators native to the O/S platform. On Windows, it will use backward slashes (&quot;\&quot;) as the directory separator and will contain a drive specification.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path name to examine.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated string containing the new path.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ab8c4852b9d8de93f10389b6caa326011"></a>
<div class="api">
  <div class="prototype">
    void *
    mprGetNextItem
(<a href="#struct_mpr_list" class="ref">MprList</a> *list, int *lastIndex)
  </div>
  <div class="apiDetail">
<p>Get the next item in the list.</p>
    <dl><dt><b>Description</b>:</dt><dd>Returns the value of the next item in the list. Before calling this routine, mprGetFirstItem must be called to initialize the traversal of the list.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">list</td><td>List pointer returned from mprCreateList.</td></tr>
    <tr><td class="param">lastIndex</td><td>Pointer to an integer that will hold the last index retrieved.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Next item in list or null for an empty list or after the last item.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a9644a249a4851fabce945c85c2a0965c"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_key" class="ref">MprKey</a> *
    mprGetNextKey
(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table, <a href="#struct_mpr_key" class="ref">MprKey</a> *last)
  </div>
  <div class="apiDetail">
<p>Return the next symbol in a symbol entry.</p>
    <dl><dt><b>Description</b>:</dt><dd>Continues walking the contents of a symbol table by returning the next entry in the symbol table. A previous call to mprGetFirstSymbol or mprGetNextSymbol is required to supply the value of the last argument.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">table</td><td>Symbol table returned via mprCreateHash.</td></tr>
    <tr><td class="param">last</td><td>Symbol table entry returned via mprGetFirstSymbol or mprGetNextSymbol.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Pointer to the first entry in the symbol table.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a7e7ded5f14780271e8823401d052728e"></a>
<div class="api">
  <div class="prototype">
    void *
    mprGetNextStableItem
(<a href="#struct_mpr_list" class="ref">MprList</a> *list, int *lastIndex)
  </div>
  <div class="apiDetail">
<p>Get the next item in a stable list.</p>
This is an optimized version of mprGetNextItem
    <dl><dt><b>Description</b>:</dt><dd>Returns the value of the next item in the list. Before calling this routine, mprGetFirstItem must be called to initialize the traversal of the list.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">list</td><td>List pointer returned from mprCreateList.</td></tr>
    <tr><td class="param">lastIndex</td><td>Pointer to an integer that will hold the last index retrieved.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Next item in list.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a675f57002f372b9c35eba6694b0a1ee8"></a>
<div class="api">
  <div class="prototype">
    int
    mprGetOsError
(void )
  </div>
  <div class="apiDetail">
<p>Return the O/S error code.</p>
    <dl><dt><b>Description</b>:</dt><dd>Returns an O/S error code from the most recent system call. This returns errno on Unix systems or GetLastError() on Windows.</dd></dl>
    <dl><dt>Returns:</dt><dd>The O/S error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ae7c3778c00352aea0b3c0b6cfac662e8"></a>
<div class="api">
  <div class="prototype">
    int
    mprGetPageSize
(void )
  </div>
  <div class="apiDetail">
<p>Get the current O/S virtual page size.</p>
    <dl><dt>Returns:</dt><dd>The page size in bytes.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a67cb15b6180246f71aca64ae75585646"></a>
<div class="api">
  <div class="prototype">
    char *
    mprGetPassword
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *prompt)
  </div>
  <div class="apiDetail">
<p>Get a password from the terminal console.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">prompt</td><td>Text prompt to display before reading the password.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The entered password.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af232054aa297f7ea84ae264e0b83515b"></a>
<div class="api">
  <div class="prototype">
    char *
    mprGetPathBase
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Get the base portion of a path.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get the base portion of a path by stripping off all directory components.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path name to examine.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A path without any directory portion.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a93bc187df38787243e0e1cbf5d8f6f84"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    mprGetPathBaseRef
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Get a reference to the base portion of a path.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get the base portion of a path by stripping off all directory components. This returns a reference into the original path.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path name to examine.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A path without any directory portion. The path is a reference into the original file string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1affd0f4d195e44639ac6b8c9bd00461c3"></a>
<div class="api">
  <div class="prototype">
    char *
    mprGetPathDir
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Get the directory portion of a path.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get the directory portion of a path by stripping off the base name.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path name to examine.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A new string containing the directory name.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a07de4b4d95059c9eb10ff633eef853ea"></a>
<div class="api">
  <div class="prototype">
    char *
    mprGetPathExt
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Get the file extension portion of a path.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get the file extension portion of a path. The file extension is the portion starting with the last &quot;.&quot; in the path. It thus does not include the &quot;.&quot; as the first charcter.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path name to examine.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A path extension without the &quot;.&quot;. Returns null if no extension exists.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa863da10f93cc4c1d06a06f31c54b951"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_list" class="ref">MprList</a> *
    mprGetPathFiles
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *dir, int flags)
  </div>
  <div class="apiDetail">
<p>Create a list of files in a directory or subdirectories.</p>
This call returns a list of
MprDirEntry
objects
    <dl><dt><b>Description</b>:</dt><dd>Get the list of files in a directory and return a list.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">dir</td><td>Directory to list.</td></tr>
    <tr><td class="param">flags</td><td>The flags may be set to <a class="ref" href="#mpr_8h_1a38348b56856049b3ea9ec95744093fdd">MPR_PATH_DESCEND</a> to traverse subdirectories. This effectively appends &apos;**&apos; to the path. Set <a class="ref" href="#mpr_8h_1a905770af4f40076347a564e6ce9dcaa7">MPR_PATH_NO_DIRS</a> to exclude directories from the results. Set to MPR_PATH_HIDDEN to include hidden files that start with &quot;.&quot;. Set to MPR_PATH_DEPTH_FIRST to do a depth-first traversal, i.e. traverse subdirectories before considering adding the directory to the list.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A list (<a class="ref" href="#struct_mpr_list">MprList</a>) of <a class="ref" href="#struct_mpr_dir_entry">MprDirEntry</a> objects.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a8792fbc8c7102f46d21fb13403ef576a"></a>
<div class="api">
  <div class="prototype">
    char *
    mprGetPathFirstDir
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Get the first directory portion of a path.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path name to examine.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A new string containing the directory name.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a918a614957a1d6f2a5aba18ef24532c8"></a>
<div class="api">
  <div class="prototype">
    int
    mprGetPathInfo
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="#struct_mpr_path" class="ref">MprPath</a> *info)
  </div>
  <div class="apiDetail">
<p>Return information about a file represented by a path.</p>
    <dl><dt><b>Description</b>:</dt><dd>Returns file status information regarding the path.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>String containing the path to query.</td></tr>
    <tr><td class="param">info</td><td>Pointer to a pre-allocated <a class="ref" href="#struct_mpr_path">MprPath</a> structure.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns zero if successful, otherwise a negative MPR error code is returned.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ab7d843a3c7f004e28658affd89c8fa98"></a>
<div class="api">
  <div class="prototype">
    char *
    mprGetPathLink
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Get the target of a symbolic link.</p>
    <dl><dt><b>Description</b>:</dt><dd>Return the path pointed to by a symbolic link. Not all platforms support symbolic links.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path name to examine.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A path representing the target of the symbolic link.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa9117a09f9d5a4e6a18c2a502041fbe6"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    mprGetPathNewline
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Get the file newline character string for a given path.</p>
Return the character string used to delimit new lines in text files
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Use this path to specify either the root of the file system or a file on the file system.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A string used to delimit new lines. This is typically &quot;\n&quot; or &quot;\r\n&quot;.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a758289f4a0141c6f8ba27b006212a6a5"></a>
<div class="api">
  <div class="prototype">
    char *
    mprGetPathParent
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Get the parent directory of a path.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path name to examine.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated string containing the parent directory.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac961e6e514b9a2485d6f957162c7a1e7"></a>
<div class="api">
  <div class="prototype">
    char
    mprGetPathSeparator
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Get the default path directory separator.</p>
Return the default directory separator character used to separate directories on a given file system. Typically &quot;/&quot; or &quot;\&quot;
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Use this path to specify either the root of the file system or a file on the file system.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Character path separator.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac7dcdab739f1ee13fb3297b8740f414b"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    mprGetPathSeparators
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Get the path directory separator.</p>
Return the directory separator characters used to separate directories on a given file system. Typically &quot;/&quot; or &quot;\&quot; The first entry is the default separator
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Use this path to specify either the root of the file system or a file on the file system.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The string of path separators. The first entry is the default separator.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a64dec3a10cd155f04934f878cb41b17c"></a>
<div class="api">
  <div class="prototype">
    char *
    mprGetPortablePath
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Get a portable path.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get an equivalent absolute path that is somewhat portable. This means it will use forward slashes (&quot;/&quot;) as the directory separator. This call will not remove drive specifiers.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path name to examine.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated string containing the new path.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a2238e3929c319d66ffbd5b5ad0d7a180"></a>
<div class="api">
  <div class="prototype">
    void *
    mprGetPrevItem
(<a href="#struct_mpr_list" class="ref">MprList</a> *list, int *lastIndex)
  </div>
  <div class="apiDetail">
<p>Get the previous item in the list.</p>
    <dl><dt><b>Description</b>:</dt><dd>Returns the value of the previous item in the list. Before calling this routine, mprGetFirstItem and/or mprGetNextItem must be called to initialize the traversal of the list.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">list</td><td>List pointer returned from mprCreateList.</td></tr>
    <tr><td class="param">lastIndex</td><td>Pointer to an integer that will hold the last index retrieved.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a69984bba38604d0bbc89c6b57ee18bef"></a>
<div class="api">
  <div class="prototype">
    int
    mprGetRandomBytes
(char *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size, <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> block)
  </div>
  <div class="apiDetail">
<p>Get some random data.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Reference to a buffer to hold the random data.</td></tr>
    <tr><td class="param">size</td><td>Size of the buffer.</td></tr>
    <tr><td class="param">block</td><td>Set to true if it is acceptable to block while accumulating entropy sufficient to provide good random data. Setting to false will cause this API to not block and may return random data of a lower quality.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ab63903d563f83f3b9a409e3fdc3d06cf"></a>
<div class="api">
  <div class="prototype">
    char *
    mprGetRandomString
(<a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)
  </div>
  <div class="apiDetail">
<p>Get some random data in ascii.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">size</td><td>Size of the random data string.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aaeacafb118493798f314f974ba3f6a53"></a>
<div class="api">
  <div class="prototype">
    char *
    mprGetRelPath
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *dest, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *origin)
  </div>
  <div class="apiDetail">
<p>Get a path relative to another path.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get a relative path path from an origin path to a destination. If a relative path cannot be obtained, an absolute path to the destination will be returned. This happens if the paths cross drives.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">dest</td><td>Destination file.</td></tr>
    <tr><td class="param">origin</td><td>Starting location from which to compute a relative path to the destination If the origin is null, use the application&apos;s current working directory as the origin.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated string containing the relative directory.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a431da15c3ff9707b89a7097a85bd90de"></a>
<div class="api">
  <div class="prototype">
    <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a>
    mprGetRemainingTicks
(<a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> mark, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout)
  </div>
  <div class="apiDetail">
<p>Return the time remaining until a timeout has elapsed.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">mark</td><td>Starting time stamp.</td></tr>
    <tr><td class="param">timeout</td><td>Time in milliseconds.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Time in milliseconds until the timeout elapses.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a28e0c914d2e434073968cb04ade38742"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_rom_inode" class="ref">MprRomInode</a> *
    mprGetRomFiles
(void )
  </div>
  <div class="apiDetail">
<p>Get the ROM file system data.</p>
    <dl><dt>Returns:</dt><dd>Returns a pointer to the list of ROM inodes.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a55a456488470dd6941f602ddc3ef6be7"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    mprGetServerName
(void )
  </div>
  <div class="apiDetail">
<p>Get the application server name string.</p>
    <dl><dt>Returns:</dt><dd>A string containing the application server name string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac779f805db3f7ddafcee6248234e91e8"></a>
<div class="api">
  <div class="prototype">
    char *
    mprGetSHA
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Get an SHA1 checksum.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to examine.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated SHA1 checksum string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ade1a3d1e6cdf26bf7987d1ddc4744f83"></a>
<div class="api">
  <div class="prototype">
    char *
    mprGetSHABase64
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Get an SHA1 checksum of a null terminated string.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to checksum.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated string containing an SHA1 checksum.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa6e64b64781b25eb761448b81d427fb5"></a>
<div class="api">
  <div class="prototype">
    char *
    mprGetSHAWithPrefix
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *prefix)
  </div>
  <div class="apiDetail">
<p>Get an SHA1 checksum with optional prefix string and buffer length.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer to checksum.</td></tr>
    <tr><td class="param">len</td><td>Size of the buffer.</td></tr>
    <tr><td class="param">prefix</td><td>String prefix to insert at the start of the result.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated string containing an SHA1 checksum.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a8240b2dc5540ae928d19410447c2bab0"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprGetSocketBlockingMode
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)
  </div>
  <div class="apiDetail">
<p>Get the socket blocking mode.</p>
    <dl><dt><b>Description</b>:</dt><dd>Return the current blocking mode setting.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the socket is in blocking mode. Otherwise false.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a64ccf4250b432690a73bb66f0a639f7a"></a>
<div class="api">
  <div class="prototype">
    int
    mprGetSocketError
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)
  </div>
  <div class="apiDetail">
<p>Get a socket error code.</p>
    <dl><dt><b>Description</b>:</dt><dd>This will map a Windows socket error code into a posix error code.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A posix error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a73b28695884ae2db990efa68ae9213ca"></a>
<div class="api">
  <div class="prototype">
    <a href="#mpr_8h_1af9381320a2640ea84038579d8f143c01" class="ref">Socket</a>
    mprGetSocketHandle
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)
  </div>
  <div class="apiDetail">
<p>Get the socket file descriptor.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get the file descriptor associated with a socket.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The Socket file descriptor used by the O/S for the socket.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a0cb09a106e793b09eebbedceaab7f85c"></a>
<div class="api">
  <div class="prototype">
    int
    mprGetSocketInfo
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ip, int port, int *family, int *protocol, struct sockaddr **addr, <a href="#mpr_8h_1a7e81f05ea37d05efc10e7c45c1111d0d" class="ref">Socklen</a> *addrlen)
  </div>
  <div class="apiDetail">
<p>Get the socket for an IP:Port address.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ip</td><td>IP address or hostname.</td></tr>
    <tr><td class="param">port</td><td>Port number.</td></tr>
    <tr><td class="param">family</td><td>Output parameter to contain the Internet protocol family.</td></tr>
    <tr><td class="param">protocol</td><td>Output parameter to contain the Internet TCP/IP protocol.</td></tr>
    <tr><td class="param">addr</td><td>Allocated block to contain the sockaddr description of the socket address.</td></tr>
    <tr><td class="param">addrlen</td><td>Output parameter to hold the length of the sockaddr object.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if the call is successful. Otherwise return a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa4d2f67f80f168a4be7e5f3b96541bab"></a>
<div class="api">
  <div class="prototype">
    int
    mprGetSocketPort
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)
  </div>
  <div class="apiDetail">
<p>Get the port used by a socket.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get the TCP/IP port number used by the socket.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The integer TCP/IP port number used by the socket.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a27422f971a6b87d52c4c858dcf74fc68"></a>
<div class="api">
  <div class="prototype">
    char *
    mprGetSocketState
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)
  </div>
  <div class="apiDetail">
<p>Get the socket state.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get the socket state as string description in KEY=VALUE,... format.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The allocated string. Returns NULL if the state is not available or supported.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa272f768c5eeecf6a22181d5eabeea1e"></a>
<div class="api">
  <div class="prototype">
    int
    mprGetState
(void )
  </div>
  <div class="apiDetail">
<p>Get the MPR execution state.</p>
    <dl><dt>Returns:</dt><dd>MPR_CREATED, MPR_STARTED, MPR_STOPPING, MPR_STOPPED, MPR_DESTROYING, or MPR_DESTROYED.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5e4b8209ae5b091161b043a2dfb45186"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_file" class="ref">MprFile</a> *
    mprGetStderr
(void )
  </div>
  <div class="apiDetail">
<p>Return a file object for the Stderr I/O channel.</p>
    <dl><dt>Returns:</dt><dd>A file object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa6a0352318f57f09bf9593abbfe324af"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_file" class="ref">MprFile</a> *
    mprGetStdin
(void )
  </div>
  <div class="apiDetail">
<p>Return a file object for the Stdin I/O channel.</p>
    <dl><dt>Returns:</dt><dd>A file object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1afddacdfb3b0078d42f936fce928061b2"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_file" class="ref">MprFile</a> *
    mprGetStdout
(void )
  </div>
  <div class="apiDetail">
<p>Return a file object for the Stdout I/O channel.</p>
    <dl><dt>Returns:</dt><dd>A file object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5542317815cb01ecacfd65d9d8ead638"></a>
<div class="api">
  <div class="prototype">
    char *
    mprGetTempPath
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *tmpDir)
  </div>
  <div class="apiDetail">
<p>Make a temporary file.</p>
    <dl><dt><b>Description</b>:</dt><dd>Thread-safe way to make a unique temporary file.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">tmpDir</td><td>Base directory in which the temp file will be allocated.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated string containing the path of the temp file.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a62063a19df01cb0845f5365d390e13be"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    mprGetThreadName
(<a href="#struct_mpr_thread" class="ref">MprThread</a> *thread)
  </div>
  <div class="apiDetail">
<p>Get the thread name.</p>
    <dl><dt><b>Description</b>:</dt><dd>MPR threads are usually real O/S threads and can be used with the various locking services (<a class="ref" href="#struct_mpr_mutex">MprMutex</a>, <a class="ref" href="#struct_mpr_cond">MprCond</a>, <a class="ref" href="#struct_mpr_spin">MprSpin</a>) to enable scalable multithreaded applications.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">thread</td><td>Thread object returned from <a class="ref" href="#mpr_8h_1afad5f424b850bf2aa9f995f6c0a62fc1">mprCreateThread</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a string name for the thread.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a2d7ac727e81a013671b9a39bb7544145"></a>
<div class="api">
  <div class="prototype">
    <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a>
    mprGetTicks
(void )
  </div>
  <div class="apiDetail">
<p>Get the system time.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get the system time in milliseconds. This is a monotonically increasing time counter. It does not represent wall-clock time.</dd></dl>
    <dl><dt>Returns:</dt><dd>The system time in milliseconds.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a874f0ee5e3ec4ea75e4b6c5ac75e83ae"></a>
<div class="api">
  <div class="prototype">
    <a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="ref">MprTime</a>
    mprGetTime
(void )
  </div>
  <div class="apiDetail">
<p>Get the time.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get the date/time in milliseconds since Jan 1 1970.</dd></dl>
    <dl><dt>Returns:</dt><dd>The time in milliseconds since Jan 1 1970.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac592bf4081e72d463277963567db5aa4"></a>
<div class="api">
  <div class="prototype">
    int
    mprGetTimeZoneOffset
(<a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="ref">MprTime</a> when)
  </div>
  <div class="apiDetail">
<p>Get the current timezone offset for a given time.</p>
    <dl><dt><b>Description</b>:</dt><dd>Calculate the current timezone (including DST).</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">when</td><td>Time to examine to extract the timezone.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a timezone offset in msec. Local time == (UTC + offset).</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1adf4522a53e12aed99b2de90642514ff8"></a>
<div class="api">
  <div class="prototype">
    char *
    mprGetWinPath
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Convert a path to an absolute windows path.</p>
    <dl><dt><b>Description</b>:</dt><dd>Get a windows style, absolute (canonical) equivalent representation of a path. This path will have back-slash delimiters and a drive specifier. On non-windows systems, this returns an absolute path using mprGetAbsPath.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path to examine.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A windows-style absolute path.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ada34402b39990eab1ff9d55d9e271076"></a>
<div class="api">
  <div class="prototype">
    void
    mprGetWorkerStats
(<a href="#struct_mpr_worker_stats" class="ref">MprWorkerStats</a> *stats)
  </div>
  <div class="apiDetail">
<p>Get the Worker service statistics.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">stats</td><td>Reference to stats object to receive the stats.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a393f36fdfba1bf0b17a7df289c1eae29"></a>
<div class="api">
  <div class="prototype">
    void
    mprGlobalLock
(void )
  </div>
  <div class="apiDetail">
<p>Globally lock the application.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call asserts the application global lock so that other threads calling mprGlobalLock will block until the current thread calls mprGlobalUnlock. WARNING: Use this API very sparingly.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aeaf0a9ee6fe651307aa4c8d8061cdbd4"></a>
<div class="api">
  <div class="prototype">
    void
    mprGlobalUnlock
(void )
  </div>
  <div class="apiDetail">
<p>Unlock the global mutex.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call unlocks the global mutex previously locked via mprGlobalLock.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a2f20d99a934d49a8decce59928e40add"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_list" class="ref">MprList</a> *
    mprGlobPathFiles
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *patterns, int flags)
  </div>
  <div class="apiDetail">
<p>Create a list of files in a directory or subdirectories that match the given wildcard pattern.</p>
This call returns a list of filenames
    <dl><dt><b>Description</b>:</dt><dd>Get the list of files in a directory and return a list. The pattern list may contain wild cards: &quot;?&quot; Matches any single character, &quot;*&quot; matches zero or more characters of the file or directory, &quot;**&quot;/ matches zero or more directories, &quot;**&quot; matches zero or more files or directories. An exclusion pattern may be specified to apply to subsequent patterns by appending with &quot;!&quot;.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Directory to list.</td></tr>
    <tr><td class="param">patterns</td><td>Wild card pattern to match.</td></tr>
    <tr><td class="param">flags</td><td>Set to MPR_PATH_HIDDEN to include hidden files that start with &quot;.&quot;. Set to MPR_PATH_DEPTH_FIRST to do a depth-first traversal, i.e. traverse subdirectories before considering adding the directory to the list. Set MPR_PATH_RELATIVE to return files relative to the given path. Set MPR_PATH_NO_DIRS to omit directories.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A list (<a class="ref" href="#struct_mpr_list">MprList</a>) of filenames.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a00b4c52b236de298af2ac5047bab6e57"></a>
<div class="api">
  <div class="prototype">
    int
    mprGrowBuf
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> count)
  </div>
  <div class="apiDetail">
<p>Grow the buffer.</p>
    <dl><dt><b>Description</b>:</dt><dd>Grow the storage allocated for content for the buffer. The new size must be less than the maximum limit specified via <a class="ref" href="#mpr_8h_1a9de0736b6967e4569192d230f16b8d71">mprCreateBuf</a> or <a class="ref" href="#mpr_8h_1ab72f5c9cc154767c1b299f665237d6a6">mprSetBufSize</a></dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    <tr><td class="param">count</td><td>Count of bytes by which to grow the buffer content size.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful and otherwise a negative error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ab74682f4b1d74e4dd032eee73800e68f"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprHasDualNetworkStack
(void )
  </div>
  <div class="apiDetail">
<p>has the system got a dual IPv4 + IPv6 network stack.</p>
    <dl><dt>Returns:</dt><dd>True if the network can listen on IPv4 and IPv6 on a single socket.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a0ca4e763d720aa680cd08f60e72bb611"></a>
<div class="api">
  <div class="prototype">
    char *
    mprHashKeysToString
(<a href="#struct_mpr_hash" class="ref">MprHash</a> *hash, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *join)
  </div>
  <div class="apiDetail">
<p>Convert hash keys to a single string.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">hash</td><td>Hash pointer returned from mprCreateHash.</td></tr>
    <tr><td class="param">join</td><td>String to use as the element join string.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>String consisting of the joined hash keys.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a1b97fba4dcfc54fba334b3ebfd92bb22"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_json" class="ref">MprJson</a> *
    mprHashToJson
(<a href="#struct_mpr_hash" class="ref">MprHash</a> *hash)
  </div>
  <div class="apiDetail">
<p>Convert a hash object into a JSON object.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">hash</td><td><a class="ref" href="#struct_mpr_hash">MprHash</a> object.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An <a class="ref" href="#struct_mpr_json">MprJson</a> instance.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa4f0e9abc480e2690755f31783323434"></a>
<div class="api">
  <div class="prototype">
    char *
    mprHashToString
(<a href="#struct_mpr_hash" class="ref">MprHash</a> *hash, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *join)
  </div>
  <div class="apiDetail">
<p>Convert a hash of strings to a single string.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">hash</td><td>Hash pointer returned from mprCreateHash.</td></tr>
    <tr><td class="param">join</td><td>String to use as the element join string.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>String consisting of the joined hash values.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ab41059d0eacfb553ab7697c970fbebdb"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprHasIPv6
(void )
  </div>
  <div class="apiDetail">
<p>Determine if the system support IPv6.</p>
    <dl><dt>Returns:</dt><dd>True if the address system supports IPv6 networking.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a88bd0a2f9a3d1fb30b5a2117375d00b3"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprHasMemError
(void )
  </div>
  <div class="apiDetail">
<p>Determine if the MPR has encountered memory allocation errors.</p>
    <dl><dt><b>Description</b>:</dt><dd>Returns true if the MPR has had a memory allocation error. Allocation errors occur if any memory allocation would cause the application to exceed the configured warnHeap limit, or if any O/S memory allocation request fails.</dd></dl>
    <dl><dt>Returns:</dt><dd>TRUE if a memory allocation error has occurred. Otherwise returns FALSE.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1abcaf311da2303180d2fb24c35c629580"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprHasSecureSockets
(void )
  </div>
  <div class="apiDetail">
<p>Determine if SSL is available.</p>
    <dl><dt>Returns:</dt><dd>True if SSL is available.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ae5d78c44aca7282c6c5b85dc5b4f162e"></a>
<div class="api">
  <div class="prototype">
    void
    mprHiddenSocketData
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len, int dir)
  </div>
  <div class="apiDetail">
<p>Indicate that the application layer has buffered data for the socket.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is used by SSL and other network stacks that buffer pending data.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    <tr><td class="param">len</td><td>Length of buffered data in bytes.</td></tr>
    <tr><td class="param">dir</td><td>Buffer direction. Set to MPR_READABLE for buffered read data and MPR_WRITABLE for buffered write data.</td></tr>
    </table></dd></dl>
  </div>
</div>
<a name="mpr_8h_1aac8a75ae42130538e13d4e84ccb030f4"></a>
<div class="api">
  <div class="prototype">
    void
    mprHold
(<a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr)
  </div>
  <div class="apiDetail">
<p>Hold a memory block.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call will protect a memory block from freeing by the garbage collector. Call <a class="ref" href="#mpr_8h_1a4816868550ad8a21b914de2fbe720767">mprRelease</a> to allow the block to be collected.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ptr</td><td>Any memory block.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5d4c4bb8ea12d82c3170354c43ac4ab6"></a>
<div class="api">
  <div class="prototype">
    void
    mprHoldBlocks
(<a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr, ...)
  </div>
  <div class="apiDetail">
<p>Hold memory blocks.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call will protect a set of memory blocks from freeing by the garbage collector. Call <a class="ref" href="#mpr_8h_1a57e8bfb292529e6ce63b21aca0543fb3">mprReleaseBlocks</a> to allow the blocks to be collected.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ptr</td><td>Any memory block.</td></tr>
    <tr><td class="param">...</td><td>Other memory blocks. Terminate the list with a NULL.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a217793852b371ff5520edc80bc64358c"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a>
    mprIncCache
(<a href="#struct_mpr_cache" class="ref">MprCache</a> *cache, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> amount)
  </div>
  <div class="apiDetail">
<p>Increment a numeric cache item.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cache</td><td>The cache instance object returned from <a class="ref" href="#mpr_8h_1a723be1009e7b9cd130cc53f2f3545e94">mprCreateCache</a></td></tr>
    <tr><td class="param">key</td><td>Cache item key.</td></tr>
    <tr><td class="param">amount</td><td>Numeric amount to increment the cache item. This may be a negative number to decrement the item.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The new value for the cache item after incrementing.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a418af9ccff881e2d7671b7c4c54099fb"></a>
<div class="api">
  <div class="prototype">
    void
    mprInitFileSystem
(<a href="#struct_mpr_file_system" class="ref">MprFileSystem</a> *fs, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Create and initialize the FileSystem subsystem.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is an internal routine called by the MPR during initialization.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">fs</td><td>File system object.</td></tr>
    <tr><td class="param">path</td><td>Path name to the root of the file system.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a0c797a3ea868662ad6dabb35f5255399"></a>
<div class="api">
  <div class="prototype">
    void
    mprInitList
(<a href="#struct_mpr_list" class="ref">MprList</a> *list, int flags)
  </div>
  <div class="apiDetail">
<p>Initialize a list structure.</p>
    <dl><dt><b>Description</b>:</dt><dd>If a list is statically declared inside another structure, mprInitList can be used to initialize it before use.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">list</td><td>Reference to the <a class="ref" href="#struct_mpr_list">MprList</a> struct.</td></tr>
    <tr><td class="param">flags</td><td>Control flags. Possible values are: MPR_LIST_STATIC_VALUES to indicate list items are static and should not be marked for GC. MPR_LIST_STABLE to create an optimized list for private use that is not thread-safe.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac2c7afe9194b40008b0bfaf383ba7fce"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_mutex" class="ref">MprMutex</a> *
    mprInitLock
(<a href="#struct_mpr_mutex" class="ref">MprMutex</a> *mutex)
  </div>
  <div class="apiDetail">
<p>Initialize a statically allocated Mutex lock object.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call initialized a Mutex lock object without allocation. The object can then be used used in mprLock mprTryLock and mprUnlock calls.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">mutex</td><td>Reference to an <a class="ref" href="#struct_mpr_mutex">MprMutex</a> structure to initialize.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A reference to the supplied mutex. Returns null on errors.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa98804877c521536f8b3be4e90e9016d"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_spin" class="ref">MprSpin</a> *
    mprInitSpinLock
(<a href="#struct_mpr_spin" class="ref">MprSpin</a> *lock)
  </div>
  <div class="apiDetail">
<p>Initialize a statically allocated spinlock object.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call initialized a spinlock lock object without allocation. The object can then be used used in mprSpinLock and mprSpinUnlock calls.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">lock</td><td>Reference to a static <a class="ref" href="#struct_mpr_spin">MprSpin</a> object.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A reference to the <a class="ref" href="#struct_mpr_spin">MprSpin</a> object. Returns null on errors.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a6f91b177cd36508c9d470636b04fa7b5"></a>
<div class="api">
  <div class="prototype">
    int
    mprInsertCharToBuf
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, int c)
  </div>
  <div class="apiDetail">
<p>Insert a character into the buffer.</p>
    <dl><dt><b>Description</b>:</dt><dd>Insert a character into to the buffer prior to the current buffer start point.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    <tr><td class="param">c</td><td>Character to append.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful and otherwise a negative error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af3e8599ae4707459cf42ad960256af98"></a>
<div class="api">
  <div class="prototype">
    int
    mprInsertItemAtPos
(<a href="#struct_mpr_list" class="ref">MprList</a> *list, int index, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *item)
  </div>
  <div class="apiDetail">
<p>Insert an item into a list at a specific position.</p>
    <dl><dt><b>Description</b>:</dt><dd>Insert the item into the list before the specified position. The list will grow as required to store the item.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">list</td><td>List pointer returned from <a class="ref" href="#mpr_8h_1aad013e1bb3447a42920f013eceebf174">mprCreateList</a></td></tr>
    <tr><td class="param">index</td><td>Location at which to store the item. The previous item at this index is moved up to make room.</td></tr>
    <tr><td class="param">item</td><td>Pointer to item to store.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The position index (positive integer) if successful. If the item cannot be inserted due to a memory allocation failure, -1 is returned.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1abea3b21605554425877eeb496cb5991c"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprIsAbsPathContained
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *dir)
  </div>
  <div class="apiDetail">
<p>Fast version of mprIsPathContained that works only for absolute paths.</p>
Determine if a directory is the same as or a parent of a path
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path name to examine.</td></tr>
    <tr><td class="param">dir</td><td>Directory to examine if it is a parent of path or equal to path.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if directory is a parent of the path or is the same as the given path.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a265a266b3c9f354009c225c9a2f1c75d"></a>
<div class="api">
  <div class="prototype">
    int
    mprIsCmdComplete
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd)
  </div>
  <div class="apiDetail">
<p>Test if a command is complete.</p>
A command is complete when the child has exited and all command output and error output has been received
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    </table></dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5ac545e5959e115b2cd633004f5d949b"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprIsCmdRunning
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd)
  </div>
  <div class="apiDetail">
<p>Test if the command is still running.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the command is still running.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1affaa2a3bb2f99575faf2f5d3204b2d8d"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprIsDestroyed
(void )
  </div>
  <div class="apiDetail">
<p>Determine if the MPR has finished.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is true if the MPR services have been shutdown completely. This is typically used to determine if the App has been shutdown.</dd></dl>
    <dl><dt>Returns:</dt><dd>True if the App has been instructed to exit and all the MPR services have been destroyed.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a752248cc6a0c0933c657ebdf505402be"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprIsDestroying
(void )
  </div>
  <div class="apiDetail">
<p>Test if the application is terminating and core services are being destroyed All request should immediately terminate.</p>
    <dl><dt>Returns:</dt><dd>True if the application is in the process of exiting and core services should also exit.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa07c03ff5f586d99e46ad8bc7b519eba"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprIsIdle
(<a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> traceRequests)
  </div>
  <div class="apiDetail">
<p>Determine if the App is idle.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call returns true if the App is not currently servicing any requests. By default this returns true if the MPR dispatcher, worker thread and command subsytems are idle. Callers can replace or augment the standard idle testing by definining a new idle callback via mprSetIdleCallback. <br/><br/>
Note: this routine tests for worker threads but ignores other threads created via <a class="ref" href="#mpr_8h_1afad5f424b850bf2aa9f995f6c0a62fc1">mprCreateThread</a></dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">traceRequests</td><td>If true, emit trace regarding running requests.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the App are idle.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a00cde73edc55911e4ba714f445544502"></a>
<div class="api">
  <div class="prototype">
    int
    mprIsInfinite
(double value)
  </div>
  <div class="apiDetail">
<p>Test if a double value is infinte.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">value</td><td>Value to test.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the value is +Infinity or -Infinity.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aec9134c334a714e44c62396c88a012c9"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprIsIPv6
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ip)
  </div>
  <div class="apiDetail">
<p>Determine if the IP address is an IPv6 address.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ip</td><td>IP address.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the address is an IPv6 address, otherwise zero.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a05a04872e6d51bca40b2223e466984b7"></a>
<div class="api">
  <div class="prototype">
    int
    mprIsNan
(double value)
  </div>
  <div class="apiDetail">
<p>Test if a double value is not-a-number.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">value</td><td>Value to test.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the value is NaN.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a2049719abeb04bb8cc89e89dbc8ad4aa"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprIsPathAbs
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Determine if a path is absolute.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path name to examine.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the path is absolue.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af9bf23ba3a4c680f860f8d392b17576c"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprIsPathContained
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *dir)
  </div>
  <div class="apiDetail">
<p>Determine if a directory is the same as or a parent of a path.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">dir</td><td>Directory to examine if it is a parent of path.</td></tr>
    <tr><td class="param">path</td><td>Path name to examine.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if directory is a parent of the path or is the same as the given path.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a3e583d5b6b29cdc5cf686802c2ca40f3"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprIsPathDir
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Determine if a path is a directory.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path name to examine.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the path is a directory.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a932b2591cfd0deda28a559c9286800ba"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprIsPathRel
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Determine if a path is relative.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path name to examine.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the path is relative.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a4328cbd16ad63b5ddcfa1db28192a53c"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprIsPathSeparator
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> c)
  </div>
  <div class="apiDetail">
<p>Test if a character is a path separarator.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path name to identify the file system.</td></tr>
    <tr><td class="param">c</td><td>Character to test.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns true if the character is a path separator on the file system containing the given path.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a122966f272c5d7d00bab8f66d569d362"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprIsSocketEof
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)
  </div>
  <div class="apiDetail">
<p>Test if the other end of the socket has been closed.</p>
    <dl><dt><b>Description</b>:</dt><dd>Determine if the other end of the socket has been closed and the socket is at end-of-file.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the socket is at end-of-file.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1abeeb5c489632e55d36e2139f8ac0f423"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprIsSocketSecure
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)
  </div>
  <div class="apiDetail">
<p>Determine if the socket is secure.</p>
    <dl><dt><b>Description</b>:</dt><dd>Determine if the socket is using SSL to provide enhanced security.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the socket is using SSL, otherwise zero.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a9077f7fb7f0b3ab411af60dca7324da3"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprIsSocketV6
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)
  </div>
  <div class="apiDetail">
<p>Determine if the socket is using IPv6 Currently only works for server side addresses.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the socket is using IPv6, otherwise zero.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a144b28996361aeeb00e9948945d210b7"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprIsStopped
(void )
  </div>
  <div class="apiDetail">
<p>Test if the application is stopped If this routine returns true, the application shutdown has passed the point of no return.</p>
No new requests should be accepted and current requests should be aborted. Use
mprIsStopping
to test if shutdown has been initiated but current requests may continue. Use
mprIsDestroyed
to test if the application has completed its shutdown
    <dl><dt>Returns:</dt><dd>True if the application is in the process of exiting.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a7e84dffeb346754ceff2fff74da87bc6"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprIsStopping
(void )
  </div>
  <div class="apiDetail">
<p>Test if the application is stopping If mprIsStopping is true, the application has commenced a shutdown.</p>
No new requests should be accepted and current request should complete if possible. Use
mprIsDestroyed
to test if the application has completed its shutdown
    <dl><dt>Returns:</dt><dd>True if the application is in the process of exiting.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a60f5c1f8065e2d164160fbc71275d300"></a>
<div class="api">
  <div class="prototype">
    int
    mprIsValid
(<a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr)
  </div>
  <div class="apiDetail">
<p>Test is a pointer is a valid memory context.</p>
This is used to test if a block has been dynamically allocated
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ptr</td><td>Any memory context allocated by mprAlloc or mprCreate.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1afb9eede8122d445daefbadd3122bba42"></a>
<div class="api">
  <div class="prototype">
    int
    mprIsZero
(double value)
  </div>
  <div class="apiDetail">
<p>Test if a double value is zero.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">value</td><td>Value to test.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the value is zero.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1acdda62c3b86f55ac5fb8aeb7577e793a"></a>
<div class="api">
  <div class="prototype">
    char *
    mprJoinPath
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *base, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Join paths.</p>
    <dl><dt><b>Description</b>:</dt><dd>Join a path to a base path. If path is absolute, it will be returned.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">base</td><td>Directory path name to use as the base.</td></tr>
    <tr><td class="param">path</td><td>Other path name to join to the base path.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Allocated string containing the resolved path.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af830a34e57be320edb599e4b531d74da"></a>
<div class="api">
  <div class="prototype">
    char *
    mprJoinPathExt
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ext)
  </div>
  <div class="apiDetail">
<p>Join an extension to a path.</p>
    <dl><dt><b>Description</b>:</dt><dd>Add an extension to a path if it does not already have one.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path name to use as a base. Path is not modified.</td></tr>
    <tr><td class="param">ext</td><td>Extension to add. Must should not have a period prefix.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Allocated string containing the resolved path.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a762f62a5d048a067087092f7f783cad8"></a>
<div class="api">
  <div class="prototype">
    char *
    mprJoinPaths
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *base, ...)
  </div>
  <div class="apiDetail">
<p>Join paths.</p>
    <dl><dt><b>Description</b>:</dt><dd>Join each given path in turn to the path. Calls mprJoinPath for each argument.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">base</td><td>Directory path name to use as the base.</td></tr>
    <tr><td class="param">...</td><td>Other paths to join to the base path. List of other paths must be NULL terminated.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Allocated string containing the resolved path.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a6f0672f4d59870af9b7ba192c5ab9384"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_list" class="ref">MprList</a> *
    mprJsonToEnv
(<a href="#struct_mpr_json" class="ref">MprJson</a> *json, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *prefix, <a href="#struct_mpr_list" class="ref">MprList</a> *list)
  </div>
  <div class="apiDetail">
<p>Convert a JSON object to a string of environment variables.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">json</td><td>JSON object tree.</td></tr>
    <tr><td class="param">prefix</td><td>String prefix for environment substrings.</td></tr>
    <tr><td class="param">list</td><td><a class="ref" href="#struct_mpr_list">MprList</a> to hold environment strings. Set to NULL and this routine will create a list.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A list of environment strings.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ab79e2004612cf322ae66e6bf1b58624e"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_hash" class="ref">MprHash</a> *
    mprJsonToHash
(<a href="#struct_mpr_json" class="ref">MprJson</a> *json)
  </div>
  <div class="apiDetail">
<p>Convert a JSON object into a Hash object.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">json</td><td>JSON object tree.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An <a class="ref" href="#struct_mpr_hash">MprHash</a> instance.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a40fe70c168712e6e9b6d89dd84ca1113"></a>
<div class="api">
  <div class="prototype">
    char *
    mprJsonToString
(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, int flags)
  </div>
  <div class="apiDetail">
<p>Serialize a JSON object into a string.</p>
    <dl><dt><b>Description</b>:</dt><dd>Serializes a top level JSON object created via mprParseJson into a characters string in JSON format.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">obj</td><td>Object returned via <a class="ref" href="#mpr_8h_1a0de687b086c6e81c5c8e32c999cdc29f">mprParseJson</a></td></tr>
    <tr><td class="param">flags</td><td>Serialization flags. Supported flags include MPR_JSON_PRETTY for a human-readable multiline format. MPR_JSON_QUOTES to wrap property names in quotes. Use MPR_JSON_STRINGS to emit all property values as quoted strings.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a serialized JSON character string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a03b1900a4646dcac3b07cb9269ec549a"></a>
<div class="api">
  <div class="prototype">
    <a href="#mpr_8h_1af9381320a2640ea84038579d8f143c01" class="ref">Socket</a>
    mprListenOnSocket
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ip, int port, int flags)
  </div>
  <div class="apiDetail">
<p>Listen on a server socket for incoming connections.</p>
    <dl><dt><b>Description</b>:</dt><dd>Open a server socket and listen for client connections. If ip is null, then this will listen on both IPv6 and IPv4.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned via <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    <tr><td class="param">ip</td><td>IP address to bind to. Set to 0.0.0.0 to bind to all possible addresses on a given port.</td></tr>
    <tr><td class="param">port</td><td>TCP/IP port number to connect to.</td></tr>
    <tr><td class="param">flags</td><td>Socket flags may use the following flags ored together: <ul><li>MPR_SOCKET_BLOCK - to use blocking I/O. The default is non-blocking. </li><li>MPR_SOCKET_BROADCAST - Use IPv4 broadcast </li><li>MPR_SOCKET_DATAGRAM - Use IPv4 datagrams </li><li>MPR_SOCKET_NOREUSE - Set NOREUSE flag on the socket </li><li>MPR_SOCKET_NODELAY - Set NODELAY on the socket </li><li>MPR_SOCKET_THREAD - Process callbacks on a separate thread. </li></ul></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if the connection is successful. Otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5ed0d733bcabadfc54d4b742aee6d4d4"></a>
<div class="api">
  <div class="prototype">
    char *
    mprListToString
(<a href="#struct_mpr_list" class="ref">MprList</a> *list, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *join)
  </div>
  <div class="apiDetail">
<p>Convert a list of strings to a single string.</p>
This uses the specified join string between the elements
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">list</td><td>List pointer returned from mprCreateList.</td></tr>
    <tr><td class="param">join</td><td>String to use as the element join string. May be null.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1affc6fc3de28ebfced024b0e60bb8d242"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_json" class="ref">MprJson</a> *
    mprLoadJson
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Load a JSON object from a filename.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Filename path containing a JSON string to load.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>JSON object tree.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a0635aab03b2954a722a39dd5e2545312"></a>
<div class="api">
  <div class="prototype">
    int
    mprLoadModule
(<a href="#struct_mpr_module" class="ref">MprModule</a> *mp)
  </div>
  <div class="apiDetail">
<p>Load a module.</p>
    <dl><dt><b>Description</b>:</dt><dd>Load a module library. This will load a dynamic shared object (shared library) and call the modules library entry point. If the module is already loaded, this call will do nothing.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">mp</td><td>Module object created via <a class="ref" href="#mpr_8h_1a35f4f35014f5601bb37ba7bbfcac62be">mprCreateModule</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a585388ae65782b535dcea572e65ed94b"></a>
<div class="api">
  <div class="prototype">
    int
    mprLoadNativeModule
(<a href="#struct_mpr_module" class="ref">MprModule</a> *mp)
  </div>
  <div class="apiDetail">
<p>Load a native module.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">mp</td><td>Module object created via <a class="ref" href="#mpr_8h_1a35f4f35014f5601bb37ba7bbfcac62be">mprCreateModule</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1adbe4b5a9c6fbb78223f9d801e3d94bb2"></a>
<div class="api">
  <div class="prototype">
    int
    mprLoadSsl
(void )
  </div>
  <div class="apiDetail">
<p>Load the SSL module.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ad193cb5549a1101dc17177f046144ede"></a>
<div class="api">
  <div class="prototype">
    void
    mprLock
(<a href="#struct_mpr_mutex" class="ref">MprMutex</a> *lock)
  </div>
  <div class="apiDetail">
<p>Lock access.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call asserts a lock on the given lock mutex so that other threads calling mprLock will block until the current thread calls mprUnlock.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a13660aa56e0e5945b6de8f2708aed520"></a>
<div class="api">
  <div class="prototype">
    void
    mprLog
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *tags, int level, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
  </div>
  <div class="apiDetail">
<p>Write a message to the error log file.</p>
    <dl><dt><b>Description</b>:</dt><dd>Send a message to the MPR error logging subsystem. The purpose of the error log is to record essential configuration and error conditions. Per-request trace typically is sent to a separate trace log. <br/><br/>
 By default, error log messages are sent to the standard error output. Applications may redirect output by installing a log handler using <a class="ref" href="#mpr_8h_1a834e7ceec5efa68d0d73eb45c3c69780">mprSetLogHandler</a>. <br/><br/>
 Log messages should be a single text line to facilitate machine processing of log files. Descriptive tag words may be provided to indicate a severity level and to classifiy messages. By convention, tags may include one of the severity levels defined in RFC 5424: &quot;debug&quot;, &quot;info&quot;, &quot;notice&quot;, &quot;warn&quot;, &quot;error&quot;, &quot;critical&quot;. Messages using the &quot;error&quot;, &quot;critical&quot; tags should use a level of zero. Tags should be space separated. By convention, specify the RFC tag name first in a list of tags. <br/><br/>
 The default log handler emits messages in three formats depending on whether MPR_LOG_DETAILED is provided to <a class="ref" href="#mpr_8h_1a8497fae7134238ba1b5f22680b1fd344">mprStartLogging</a> and the value of the tags parameter. If MPR_LOG_DETAILED and tags are supplied, the format is: &quot;MM/DD/YY HH:MM:SS LEVEL TAGS, Message&quot;. Otherwise a a simplified output format is used: &quot;Name: severity:
       message&quot;, where severity is set to &quot;error&quot; for level 0 messages. This is useful for utility programs. If tags are null, the message is output raw, without any any prefixes. <br/><br/>
 Logging typically is enabled in both debug and release builds and may be controlled via the build define ME_MPR_LOGGING which is typically set via the MakeMe setting &quot;logging: true&quot;. <br/><br/>
 The mprDebug API may be used to emit log messages only in debug builds. <br/><br/>
 If level zero is used, the message is also sent to any relevant operating system logging facility such as syslog or the Windows event database. <br/><br/>
 It is good practice to only include debug trace at levels above level 2 so that essential error messages are clearly visible in the error log and are not swamped by debug messages.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">tags</td><td>Descriptive space separated tag words to classify this message. Tag words may be provided to indicate a severity level and to classifiy messages. By convention, tags may include one of the severity levels defined in RFC 5424: &quot;debug&quot;, &quot;info&quot;, &quot;notice&quot;, &quot;warn&quot;, &quot;error&quot;, &quot;critical&quot;. Messages using the &quot;error&quot;, &quot;critical&quot; tags should use a level of zero. Tags should be space separated. By convention, specify the RFC tag name first in a list of tags.</td></tr>
    <tr><td class="param">level</td><td>Logging level for this message. The level is 0-5 with five being the most verbose.</td></tr>
    <tr><td class="param">fmt</td><td>Printf style format string. Variable number of arguments to print.</td></tr>
    <tr><td class="param">...</td><td>Variable number of arguments for printf data.</td></tr>
    </table></dd></dl>
    <dl><dt>Remarks:</dt><dd>MprLog is highly useful as a debugging aid.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af8aad777a56ff5b27dc2d6e09bd4f1d1"></a>
<div class="api">
  <div class="prototype">
    void void
    mprLogConfig
(void )
  </div>
  <div class="apiDetail">
<p>Show the product configuration at the start of the log file.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a140cca664bd923f04c12eaa3cbc3f516"></a>
<div class="api">
  <div class="prototype">
    void
    mprLogJson
(int level, <a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
  </div>
  <div class="apiDetail">
<p>Trace the JSON object to the debug log.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">level</td><td>Debug trace level.</td></tr>
    <tr><td class="param">obj</td><td>Object to trace.</td></tr>
    <tr><td class="param">fmt</td><td>Printf style format and args.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a9ae5abc2e8c8b3359ca450e505564359"></a>
<div class="api">
  <div class="prototype">
    int
    mprLookAtLastCharInBuf
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)
  </div>
  <div class="apiDetail">
<p>Peek at the last character in the buffer.</p>
    <dl><dt><b>Description</b>:</dt><dd>Non-destructively return the last character from just prior to the end position in the buffer. The character is returned and the end position is not altered.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful and otherwise a negative error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1abe01ab970d735db5a92cea5f9456de5e"></a>
<div class="api">
  <div class="prototype">
    int
    mprLookAtNextCharInBuf
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)
  </div>
  <div class="apiDetail">
<p>Peek at the next character in the buffer.</p>
    <dl><dt><b>Description</b>:</dt><dd>Non-destructively return the next character from the start position in the buffer. The character is returned and the start position is not altered.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful and otherwise a negative error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a39646bbac635d351180372a670d0ec2b"></a>
<div class="api">
  <div class="prototype">
    char *
    mprLookupCache
(<a href="#struct_mpr_cache" class="ref">MprCache</a> *cache, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="ref">MprTime</a> *modified, <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> *version)
  </div>
  <div class="apiDetail">
<p>Lookup an item in the cache.</p>
    <dl><dt><b>Description</b>:</dt><dd>Same as mprReadCache but will not update the last accessed time.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cache</td><td>The cache instance object returned from <a class="ref" href="#mpr_8h_1a723be1009e7b9cd130cc53f2f3545e94">mprCreateCache</a></td></tr>
    <tr><td class="param">key</td><td>Cache item key.</td></tr>
    <tr><td class="param">modified</td><td>Optional MprTime value reference to receive the last modified time of the cache item. Set to null if not required.</td></tr>
    <tr><td class="param">version</td><td>Optional int64 value reference to receive the version number of the cache item. Set to null if not required. Cache items have a version number that is incremented every time the item is updated.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The cache item value.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af9996ff8e70915b7d1273f19bb198e2a"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_file_system" class="ref">MprFileSystem</a> *
    mprLookupFileSystem
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Lookup a file system.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path representing a file in the file system.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a file system object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a8b3d6afe4be8d416e28f64d05e8391eb"></a>
<div class="api">
  <div class="prototype">
    int
    mprLookupItem
(<a href="#struct_mpr_list" class="ref">MprList</a> *list, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *item)
  </div>
  <div class="apiDetail">
<p>Find an item and return its index.</p>
    <dl><dt><b>Description</b>:</dt><dd>Search for an item in the list and return its index.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">list</td><td>List pointer returned from mprCreateList.</td></tr>
    <tr><td class="param">item</td><td>Pointer to value stored in the list.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Positive list index if found, otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5b3e1f1d4e80038ece3362c328c43820"></a>
<div class="api">
  <div class="prototype">
    void *
    mprLookupKey
(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *key)
  </div>
  <div class="apiDetail">
<p>Lookup a symbol in the hash table.</p>
    <dl><dt><b>Description</b>:</dt><dd>Lookup a symbol key and return the value associated with that key.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">table</td><td>Symbol table returned via mprCreateHash.</td></tr>
    <tr><td class="param">key</td><td>String key of the symbol entry to delete.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Value associated with the key when the entry was inserted via mprInsertSymbol.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a88479632e016f3def6fc4361ee8f896a"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_key" class="ref">MprKey</a> *
    mprLookupKeyEntry
(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *key)
  </div>
  <div class="apiDetail">
<p>Lookup a symbol in the hash table and return the hash entry.</p>
    <dl><dt><b>Description</b>:</dt><dd>Lookup a symbol key and return the hash table descriptor associated with that key.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">table</td><td>Symbol table returned via mprCreateHash.</td></tr>
    <tr><td class="param">key</td><td>String key of the symbol entry to delete.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd><a class="ref" href="#struct_mpr_key">MprKey</a> for the entry.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a43fc54484f303196cb3fb66c73fb0205"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    mprLookupMime
(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ext)
  </div>
  <div class="apiDetail">
<p>Get the mime type for an extension.</p>
This call will return the mime type from a limited internal set of mime types for the given path or extension
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">table</td><td>Hash table of mime types to examine.</td></tr>
    <tr><td class="param">ext</td><td>Path or extension to examine.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Mime type string. Returns null if mime type is not known.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a13659357368fa3c581b398d25af75bb4"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_module" class="ref">MprModule</a> *
    mprLookupModule
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)
  </div>
  <div class="apiDetail">
<p>Lookup a module.</p>
    <dl><dt><b>Description</b>:</dt><dd>Lookup a module by name and return the module object.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">name</td><td>Name of the module specified to <a class="ref" href="#mpr_8h_1a35f4f35014f5601bb37ba7bbfcac62be">mprCreateModule</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A module object for this module created in the module entry point by calling <a class="ref" href="#mpr_8h_1a35f4f35014f5601bb37ba7bbfcac62be">mprCreateModule</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a8c28ede486e5dcb6e915d9bdf9b13b71"></a>
<div class="api">
  <div class="prototype">
    void *
    mprLookupModuleData
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)
  </div>
  <div class="apiDetail">
<p>Lookup a module and return the module data.</p>
    <dl><dt><b>Description</b>:</dt><dd>Lookup a module by name and return the module specific data defined via <a class="ref" href="#mpr_8h_1a35f4f35014f5601bb37ba7bbfcac62be">mprCreateModule</a></dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">name</td><td>Name of the module specified to <a class="ref" href="#mpr_8h_1a35f4f35014f5601bb37ba7bbfcac62be">mprCreateModule</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The module data.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a8b32a32be34fbcc2194767eb7031a3ad"></a>
<div class="api">
  <div class="prototype">
    int
    mprLookupStringItem
(<a href="#struct_mpr_list" class="ref">MprList</a> *list, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Find a string item and return its index.</p>
    <dl><dt><b>Description</b>:</dt><dd>Search for the first matching string in the list and return its index.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">list</td><td>List pointer returned from mprCreateList.</td></tr>
    <tr><td class="param">str</td><td>Pointer to string to look for.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Positive list index if found, otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a02a389f1cd2f5a8ba4e5d2417ae87276"></a>
<div class="api">
  <div class="prototype">
    int
    mprMakeArgv
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *command, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> ***argv, int flags)
  </div>
  <div class="apiDetail">
<p>Make a argv style array of command arguments.</p>
    <dl><dt><b>Description</b>:</dt><dd>The given command is parsed and broken into separate arguments and returned in a null-terminated, argv array. Arguments in the command may be quoted with single or double quotes to group words into one argument. Use back-quote &quot;\\&quot; to escape quotes.
    This routine allocates memory and must not be called before #mprCreate. Consider #mprParseArgs if you need to
       convert
    a command line before calling #mprCreate.
@param command Command string to parse.
@param argv Output parameter containing the parsed arguments.
@param flags Set to MPR_ARGV_ARGS_ONLY if the command string does not contain a program name. In this case, argv[0]
    will be set to &quot;".</dd></dl>
    <dl><dt>Returns:</dt><dd>The count of arguments in argv.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a8b825c9125a21012024b9b76f2683edb"></a>
<div class="api">
  <div class="prototype">
    int
    mprMakeDir
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, int perms, int owner, int group, <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> makeMissing)
  </div>
  <div class="apiDetail">
<p>Make a directory.</p>
    <dl><dt><b>Description</b>:</dt><dd>Make a directory using the supplied path. Intermediate directories are created as required.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>String containing the directory pathname to create.</td></tr>
    <tr><td class="param">makeMissing</td><td>If true make all required intervening directory segments.</td></tr>
    <tr><td class="param">perms</td><td>Posix style file permissions mask.</td></tr>
    <tr><td class="param">owner</td><td>User to own the directory. Set to -1 not change the owner.</td></tr>
    <tr><td class="param">group</td><td>Group to own the directory. Set to -1 not change the group.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns zero if successful, otherwise a negative MPR error code is returned.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ab87f107b898264faed9e921d6a3669e3"></a>
<div class="api">
  <div class="prototype">
    int
    mprMakeLink
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *target, <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> hard)
  </div>
  <div class="apiDetail">
<p>Make a link.</p>
    <dl><dt><b>Description</b>:</dt><dd>Make a link at the target to the specified path. This will make symbolic or hard links depending on the value of the hard parameter.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>String containing the path to link to.</td></tr>
    <tr><td class="param">target</td><td>String containing the new link path to be created.</td></tr>
    <tr><td class="param">hard</td><td>If true, make a hard link, otherwise make a soft link.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns zero if successful, otherwise a negative MPR error code is returned.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac1ee2c0edbc79bd697a1e5e91150bda2"></a>
<div class="api">
  <div class="prototype">
    char *
    mprMakePassword
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *password, int saltLength, int rounds)
  </div>
  <div class="apiDetail">
<p>Make a password hash for a plain-text password using the Blowfish algorithm.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">password</td><td>User&apos;s password to encrypt.</td></tr>
    <tr><td class="param">saltLength</td><td>Length of salt text to add to password. Helps to make each user&apos;s password unique.</td></tr>
    <tr><td class="param">rounds</td><td>Number of times to encrypt. More times, makes the routine slower and passwords harder to crack.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The encrypted password.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a93df5d947a962e68915d2f30d23f21ca"></a>
<div class="api">
  <div class="prototype">
    char *
    mprMakeSalt
(<a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)
  </div>
  <div class="apiDetail">
<p>Make salt for adding to a password.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">size</td><td>Size in bytes of the salt text.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The random salt text.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ab9be6174f5d4126e39a9380c0386e6a4"></a>
<div class="api">
  <div class="prototype">
    void
    mprMapSeparators
(char *path, int separator)
  </div>
  <div class="apiDetail">
<p>Map the separators in a path.</p>
    <dl><dt><b>Description</b>:</dt><dd>Map the directory separators in a path to the specified separators. This is useful to change from backward to forward slashes when dealing with Windows paths.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path name to examine.</td></tr>
    <tr><td class="param">separator</td><td>Separator character to use.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac1eebe67d99890d0156d6fdd7fc2c7c8"></a>
<div class="api">
  <div class="prototype">
    void
    mprMark
(void *ptr)
  </div>
  <div class="apiDetail">
<p>Mark a memory block as in-use.</p>
    <dl><dt><b>Description</b>:</dt><dd>To prevent a memory block being freed by the garbage collector, it must be marked as &quot;active&quot;. Memory blocks can define a manager that will be invoked by the garbage collector to mark any fields that are required by the original block.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ptr</td><td>Reference to managed memory block. This must be managed memory allocated by the MPR. Do not call mprMark on memory allocated via malloc(), strdup() or other non-MPR allocation routines. It is safe pass a NULL pointer to mprMark and this will have no effect. This is a convenient pattern where manager functions can call <a class="ref" href="#mpr_8h_1ac1eebe67d99890d0156d6fdd7fc2c7c8">mprMark()</a> without testing if the element reference is null or not.</td></tr>
    </table></dd></dl>
  </div>
</div>
<a name="mpr_8h_1a1e8d2072b9923ca7a579d9dabbad1ea3"></a>
<div class="api">
  <div class="prototype">
    int
    mprMemcmp
(<a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *b1, <a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a> b1Len, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *b2, <a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a> b2Len)
  </div>
  <div class="apiDetail">
<p>Compare two byte strings.</p>
    <dl><dt><b>Description</b>:</dt><dd>Safely compare two byte strings. This is a safe replacement for memcmp.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">b1</td><td>Pointer to the first byte string.</td></tr>
    <tr><td class="param">b1Len</td><td>Length of the first byte string.</td></tr>
    <tr><td class="param">b2</td><td>Pointer to the second byte string.</td></tr>
    <tr><td class="param">b2Len</td><td>Length of the second byte string.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns zero if the byte strings are identical. Otherwise returns -1 if the first string is less than the second. Returns 1 if the first is greater than the first.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a115724cd4423263288212f7a300f21d7"></a>
<div class="api">
  <div class="prototype">
    <a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a>
    mprMemcpy
(void *dest, <a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a> destMax, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *src, <a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a> nbytes)
  </div>
  <div class="apiDetail">
<p>Safe copy for a block of data.</p>
    <dl><dt><b>Description</b>:</dt><dd>Safely copy a block of data into an existing memory block. The call ensures the destination block is not overflowed and returns the size of the block actually copied. This is similar to memcpy, but is a safer alternative.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">dest</td><td>Pointer to the destination block.</td></tr>
    <tr><td class="param">destMax</td><td>Maximum size of the destination block.</td></tr>
    <tr><td class="param">src</td><td>Block to copy.</td></tr>
    <tr><td class="param">nbytes</td><td>Size of the source block.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The number of characters in the allocated block.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a0c911ea8e56d1dee46e1a25da801f589"></a>
<div class="api">
  <div class="prototype">
    void *
    mprMemdup
(<a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr, <a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a> size)
  </div>
  <div class="apiDetail">
<p>Duplicate a block of memory.</p>
    <dl><dt><b>Description</b>:</dt><dd>Copy a block of memory into a newly allocated block.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ptr</td><td>Pointer to the block to duplicate.</td></tr>
    <tr><td class="param">size</td><td>Size of the block to copy.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns an allocated block.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa3bb4935aa8ee20f4f064068ff28b2a5"></a>
<div class="api">
  <div class="prototype">
    void
    mprNap
(<a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> msec)
  </div>
  <div class="apiDetail">
<p>Nap for a while.</p>
    <dl><dt><b>Description</b>:</dt><dd>This routine blocks and does not yield for GC. Only use it for very short naps.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">msec</td><td>Number of milliseconds to sleep.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a525ba7359a573e4dee78703ea6ef93eb"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprNeedYield
(void )
  </div>
  <div class="apiDetail">
<p>Test if a thread should call mprYield.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call tests if a thread should yield to the garbage collector.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5c43b80274f98cb355a25b1cefcc93df"></a>
<div class="api">
  <div class="prototype">
    char *
    mprNormalizePath
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Normalize a path.</p>
    <dl><dt><b>Description</b>:</dt><dd>A path is normalized by redundant segments such as &quot;./&quot; and &quot;../dir&quot; and duplicate path separators. Path separators are mapped. Paths are not converted to absolute paths.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>First path to compare.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A newly allocated, clean path.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac3ea30ea8cd57eb5767f1d2ae87b13d2"></a>
<div class="api">
  <div class="prototype">
    int
    mprNotifyOn
(<a href="#struct_mpr_wait_handler" class="ref">MprWaitHandler</a> *wp, int mask)
  </div>
  <div class="apiDetail">
<p>Begin I/O notification services on a wait handler.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Wait handler associated with the file descriptor.</td></tr>
    <tr><td class="param">mask</td><td>Mask of events of interest. This is made by oring MPR_READABLE and MPR_WRITABLE.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a7c2b7b9e2b2aa88b4d742f9b2c5ccfd7"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_file" class="ref">MprFile</a> *
    mprOpenFile
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *filename, int omode, int perms)
  </div>
  <div class="apiDetail">
<p>Open a file.</p>
    <dl><dt><b>Description</b>:</dt><dd>Open a file and return a file object.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">filename</td><td>String containing the filename to open or create.</td></tr>
    <tr><td class="param">omode</td><td>Posix style file open mode mask. The open mode may contain the following mask values ored together: <ul><li>O_RDONLY Open read only </li><li>O_WRONLY Open write only </li><li>O_RDWR Open for read and write </li><li>O_CREAT Create file if it does not exist </li><li>O_TRUNC Truncate size to zero length </li><li>O_BINARY Open for binary data </li><li>O_TEXT Open for text data </li><li>O_EXCL Open with an exclusive lock </li><li>O_APPEND Open to append </li></ul></td></tr>
    <tr><td class="param">perms</td><td>Posix style file permissions mask.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns an <a class="ref" href="#struct_mpr_file">MprFile</a> object to use in other file operations.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1adbc113c2a4d14de7a12114eda5b1e733"></a>
<div class="api">
  <div class="prototype">
    int
    mprParseArgs
(char *command, char **argv, int maxArgs)
  </div>
  <div class="apiDetail">
<p>Make a argv style array of command arguments.</p>
    <dl><dt><b>Description</b>:</dt><dd>The given command is parsed and broken into separate arguments and returned in a null-terminated, argv array. Arguments in the command may be quoted with single or double quotes to group words into one argument. Use back-quote &quot;\\&quot; to escape quotes. This routine modifies supplied command parameter and does not allocate any memory and may be used before mprCreate is invoked.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">command</td><td>Command string to parse.</td></tr>
    <tr><td class="param">argv</td><td>Array for the arguments.</td></tr>
    <tr><td class="param">maxArgs</td><td>Size of the argv array.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The count of arguments in argv.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a0de687b086c6e81c5c8e32c999cdc29f"></a>
<div class="api">
  <div class="prototype">
    void MprJson *
    mprParseJson
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Parse a JSON string into an object tree.</p>
    <dl><dt><b>Description</b>:</dt><dd>Deserializes a JSON string created into an object. The top level of the JSON string must be an object, array, string, number or boolean value.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>JSON string to deserialize.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a tree of <a class="ref" href="#struct_mpr_json">MprJson</a> objects. Each object represents a level in the JSON input stream.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a006af99fb3614d9088e5ee1c5b030fc0"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_json" class="ref">MprJson</a> *
    mprParseJsonEx
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="#struct_mpr_json_callback" class="ref">MprJsonCallback</a> *callback, void *data, <a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> **errorMsg)
  </div>
  <div class="apiDetail">
<p>Extended JSON parsing from a JSON string into an object tree.</p>
    <dl><dt><b>Description</b>:</dt><dd>Parses a string into a tree of JSON objects This extended deserialization API takes callback functions to control how the object tree is constructed. The top level of the JSON string must be an object, array, string, number or boolean value.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>JSON string to deserialize. This is an unmanaged reference. i.e. it will not be marked by the garbage collector.</td></tr>
    <tr><td class="param">callback</td><td>Callback functions. This is an instance of the <a class="ref" href="#struct_mpr_json_callback">MprJsonCallback</a> structure.</td></tr>
    <tr><td class="param">data</td><td>Opaque object to pass to the given callbacks. This is an unmanaged reference.</td></tr>
    <tr><td class="param">obj</td><td>Optional object to serialize into.</td></tr>
    <tr><td class="param">errorMsg</td><td>Error message if the string fails to parse.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns JSON object tree.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5fe7d3512b827892ecade02699d05e70"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_json" class="ref">MprJson</a> *
    mprParseJsonInto
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="#struct_mpr_json" class="ref">MprJson</a> *obj)
  </div>
  <div class="apiDetail">
<p>Parse a JSON string into an existing object.</p>
    <dl><dt><b>Description</b>:</dt><dd>Deserializes a JSON string created into an object. The top level of the JSON string must be an object, array, string, number or boolean value.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>JSON string to deserialize.</td></tr>
    <tr><td class="param">obj</td><td>JSON object to store parsed properties from str.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The object passed in via &quot;obj&quot;. This permits chaining.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a61245183116b13284f64ed2b707484aa"></a>
<div class="api">
  <div class="prototype">
    int
    mprParseSocketAddress
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *address, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> **ip, int *port, int *secure, int defaultPort)
  </div>
  <div class="apiDetail">
<p>Parse an socket address IP address.</p>
    <dl><dt><b>Description</b>:</dt><dd>This parses a string containing an IP:PORT specification and returns the IP address and port components. Handles ipv4 and ipv6 addresses.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">address</td><td>An IP:PORT specification. The :PORT is optional. When an IP address contains an ipv6 port it should be written as aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh:iiii or.</td></tr>
    <tr><td class="param">ip</td><td>Pointer to receive a dynamically allocated IP string.</td></tr>
    <tr><td class="param">port</td><td>Pointer to an integer to receive the port value.</td></tr>
    <tr><td class="param">secure</td><td>Pointer to an integer to receive true if the address requires SSL.</td></tr>
    <tr><td class="param">defaultPort</td><td>The default port number to use if the address does not contain a port.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1adbed992189919b8d40b5008ee54a0ccb"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprPathExists
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, int omode)
  </div>
  <div class="apiDetail">
<p>Determine if a file exists for a path name and can be accessed.</p>
    <dl><dt><b>Description</b>:</dt><dd>Test if a file can be accessed for a given mode.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path name to test.</td></tr>
    <tr><td class="param">omode</td><td>Posix style file open mode mask. See <a class="ref" href="#mpr_8h_1a7c2b7b9e2b2aa88b4d742f9b2c5ccfd7">mprOpenFile</a> for the various modes.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the file exists and can be accessed.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1abba294cacccaced9435b1151e2db9c95"></a>
<div class="api">
  <div class="prototype">
    int
    mprPeekFileChar
(<a href="#struct_mpr_file" class="ref">MprFile</a> *file)
  </div>
  <div class="apiDetail">
<p>Non-destructively read a character from the file.</p>
    <dl><dt><b>Description</b>:</dt><dd>Read a single character from the file without advancing the read position.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">file</td><td>Pointer to an <a class="ref" href="#struct_mpr_file">MprFile</a> object returned via MprOpen.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>If successful, return the character just read. Otherwise return a negative MPR error code. End of file is signified by reading 0.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a9b2b7113051a42a49734d88335ee543c"></a>
<div class="api">
  <div class="prototype">
    void *
    mprPopItem
(<a href="#struct_mpr_list" class="ref">MprList</a> *list)
  </div>
  <div class="apiDetail">
<p>Pop an item.</p>
    <dl><dt><b>Description</b>:</dt><dd>Treat the list as a stack and pop the last pushed item.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">list</td><td>List pointer returned from mprCreateList.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The last pushed item. If the list is empty, returns NULL.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1abfcf6cb48022377398e0b0a400e49aec"></a>
<div class="api">
  <div class="prototype">
    int
    mprPreloadSsl
(struct MprSsl *ssl, int flags)
  </div>
  <div class="apiDetail">
<p>Preload SSL configuration.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ab80b8013c78bb488b6f578cd48702259"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> ssize,ssize
    mprPrintf
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
  </div>
  <div class="apiDetail">
<p>Formatted print.</p>
This is a secure verion of printf that can handle null args
    <dl><dt><b>Description</b>:</dt><dd>This is a secure replacement for printf. It can handle null arguments without crashes.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">fmt</td><td>Printf style format string.</td></tr>
    <tr><td class="param">...</td><td>Variable arguments to format.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The number of bytes written.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ad1fa00797a25850a5aed316aaadf4b1b"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> ssize,ssize,ssize,char,*
    mprPrintfCore
(char *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> maxsize, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, va_list args)
  </div>
  <div class="apiDetail">
<p>Format a string into a buffer.</p>
    <dl><dt><b>Description</b>:</dt><dd>This routine will format the arguments into a result. If a buffer is supplied, it will be used. Otherwise if the buf argument is NULL, a buffer will be allocated. The arguments will be formatted up to the maximum size supplied by the maxsize argument. A trailing null will always be appended.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Optional buffer to contain the formatted result.</td></tr>
    <tr><td class="param">maxsize</td><td>Maximum size of the result.</td></tr>
    <tr><td class="param">fmt</td><td>Printf style format string.</td></tr>
    <tr><td class="param">args</td><td>Variable arguments to format.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The number of characters in the string.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ae5a3493548a457c179c0f7006d6171a9"></a>
<div class="api">
  <div class="prototype">
    void
    mprPrintMem
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *msg, int flags)
  </div>
  <div class="apiDetail">
<p>Print a memory usage report to stdout.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">msg</td><td>Prefix message to the report.</td></tr>
    <tr><td class="param">flags</td><td>Set to MPR_MEM_DETAIL for a detailed memory report.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5abf88b56ea534c0cb36b0969f56d274"></a>
<div class="api">
  <div class="prototype">
    void
    mprPruneCache
(<a href="#struct_mpr_cache" class="ref">MprCache</a> *cache)
  </div>
  <div class="apiDetail">
<p>Prune the cache.</p>
    <dl><dt><b>Description</b>:</dt><dd>Prune the cache and discard all cached items.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cache</td><td>The cache instance object returned from <a class="ref" href="#mpr_8h_1a723be1009e7b9cd130cc53f2f3545e94">mprCreateCache</a></td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a7f35b9db9fe36c3bf91954c6acb98467"></a>
<div class="api">
  <div class="prototype">
    int
    mprPushItem
(<a href="#struct_mpr_list" class="ref">MprList</a> *list, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *item)
  </div>
  <div class="apiDetail">
<p>Push an item onto the list.</p>
    <dl><dt><b>Description</b>:</dt><dd>Treat the list as a stack and push the last pushed item.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">list</td><td>List pointer returned from mprCreateList.</td></tr>
    <tr><td class="param">item</td><td>Item to push onto the list.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a positive integer list index for the inserted item. If the item cannot be inserted due to a memory allocation failure, -1 is returned.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa88196b86b9c9544f97e5910b015380d"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprPutBlockToBuf
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ptr, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)
  </div>
  <div class="apiDetail">
<p>Put a block to the buffer.</p>
    <dl><dt><b>Description</b>:</dt><dd>Append a block of data to the buffer at the end position and increment the end pointer.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    <tr><td class="param">ptr</td><td>Block to append.</td></tr>
    <tr><td class="param">size</td><td>Size of block to append.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful and otherwise a negative error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5ab66b5d96db8b33e3bb0c3bbb9c90e2"></a>
<div class="api">
  <div class="prototype">
    int
    mprPutCharToBuf
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, int c)
  </div>
  <div class="apiDetail">
<p>Put a character to the buffer.</p>
    <dl><dt><b>Description</b>:</dt><dd>Append a character to the buffer at the end position and increment the end pointer.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    <tr><td class="param">c</td><td>Character to append.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful and otherwise a negative error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a461e26b7175b96b6953e02e16219b426"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprPutFileChar
(<a href="#struct_mpr_file" class="ref">MprFile</a> *file, int c)
  </div>
  <div class="apiDetail">
<p>Write a character to the file.</p>
    <dl><dt><b>Description</b>:</dt><dd>Writes a single character to the file. Output is buffered and is flushed as required or when mprClose is called.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">file</td><td>Pointer to an <a class="ref" href="#struct_mpr_file">MprFile</a> object returned via MprOpen.</td></tr>
    <tr><td class="param">c</td><td>Character to write.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>One if successful, otherwise returns a negative MPR error code on errors.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a139515262948d6bd2f03d802d8fff34e"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprPutFileString
(<a href="#struct_mpr_file" class="ref">MprFile</a> *file, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Write a string to the file.</p>
    <dl><dt><b>Description</b>:</dt><dd>Writes a string to the file. Output is buffered and is flushed as required or when mprClose is called.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">file</td><td>Pointer to an <a class="ref" href="#struct_mpr_file">MprFile</a> object returned via MprOpen.</td></tr>
    <tr><td class="param">str</td><td>String to write.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The number of characters written to the file. Returns a negative MPR error code on errors.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ad98ea666348e1e1ed066b19b6f4825bb"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> ssize
    mprPutIntToBuf
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> i)
  </div>
  <div class="apiDetail">
<p>Put an integer to the buffer.</p>
    <dl><dt><b>Description</b>:</dt><dd>Append a integer to the buffer at the end position and increment the end pointer.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    <tr><td class="param">i</td><td>Integer to append to the buffer.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Number of characters added to the buffer, otherwise a negative error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ae3886d4e6180a460bc74a80047a54c70"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprPutPadToBuf
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, int c, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> count)
  </div>
  <div class="apiDetail">
<p>Put padding characters to the buffer.</p>
    <dl><dt><b>Description</b>:</dt><dd>Append padding characters to the buffer at the end position and increment the end pointer.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    <tr><td class="param">c</td><td>Character to append.</td></tr>
    <tr><td class="param">count</td><td>Count of pad characters to put.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful and otherwise a negative error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a50d08cdfc9c21e71af90586104a5839e"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprPutStringToBuf
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Put a string to the buffer.</p>
    <dl><dt><b>Description</b>:</dt><dd>Append a null terminated string to the buffer at the end position and increment the end pointer.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    <tr><td class="param">str</td><td>String to append.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful and otherwise a negative error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a394fa1a51d7f2dcc4be222f51ea5a25b"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprPutSubStringToBuf
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> count)
  </div>
  <div class="apiDetail">
<p>Put a substring to the buffer.</p>
    <dl><dt><b>Description</b>:</dt><dd>Append a null terminated substring to the buffer at the end position and increment the end pointer.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    <tr><td class="param">str</td><td>String to append.</td></tr>
    <tr><td class="param">count</td><td>Put at most count characters to the buffer.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful and otherwise a negative error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1adedfafbf8dca819c37cdbc41592b4823"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprPutToBuf
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
  </div>
  <div class="apiDetail">
<p>Put a formatted string to the buffer.</p>
    <dl><dt><b>Description</b>:</dt><dd>Format a string and append to the buffer at the end position and increment the end pointer.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    <tr><td class="param">fmt</td><td>Printf style format string.</td></tr>
    <tr><td class="param">...</td><td>Variable arguments for the format string.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful and otherwise a negative error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a870629694aae99d61e7c42724b687177"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_json" class="ref">MprJson</a> *
    mprQueryJson
(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value, int type)
  </div>
  <div class="apiDetail">
<p>Query a JSON object for a property key path and execute the given command.</p>
    <dl><dt><b>Description</b>:</dt><dd>This query API may be used to get, set or remove property values described by a JSON query key.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">obj</td><td>JSON object to examine. This may be a JSON object, array or string.</td></tr>
    <tr><td class="param">key</td><td>The property key may be a multipart property and may include . [] and .. substrings. For example: &quot;settings.mode&quot;, &quot;colors[2]&quot;, &quot;colors[2:4] and &quot;users..name&quot;.
    The &quot;.&quot; and &quot;[]&quot; operator reference sub-properties. The &quot;..&quot; elipsis operator spans zero or more
    objects levels.
    \n\n
    Inside the [] operator, you may include an expression to select objects that match the given
    expression. The expression is of the form:
    \n\n
    NAME OP value
    \n\n
    where NAME is the name of the property, OP is ==, !=, &lt;=, &gt;=, ~ or !~. The &quot;~&quot; operator is simple
    string pattern match (contains). Note that [expressions] look ahead and select array elements that have
    matching properties.
    \n\n
    For arrays, to compare the array contents value iself, use &quot;". This is useful to select by array element values. For example: colors[@ == &apos;red&apos;]. Use &quot;$&quot; to append an element to an array. <br/><br/>
 Examples: <br/><br/><pre>
    user.name
    user[&apos;name&apos;]
    users[2]
    users[2:4]
    users[-4:-1]                //  Range from end of array
    users[name == &apos;john&apos;]
    users[age &gt;= 50]
    users[phone ~ ^206]         //  Starts with 206
    users[$]                    //  Append a new element
    colors[@ != &apos;red&apos;]          //  Array element not &apos;red&apos;
    people..[name == &apos;john&apos;]    //  Elipsis descends down multiple levels
    </pre></td></tr>
    <tr><td class="param">value</td><td>If a value is provided, the property described by the key is set to the value. If getting property values, or removing, set to NULL.</td></tr>
    <tr><td class="param">type</td><td>Value data type used when setting a value. Set to MPR_JSON_FALSE, MPR_JSON_NULL, MPR_JSON_NUMBER, MPR_JSON_STRING, MPR_JSON_TRUE, MPR_JSON_UNDEFINED. Set to zero to sleuth the data type based on the supplied value. Note: if the type is zero, numeric values will be set to MPR_JSON_NUMBER and &quot;true&quot;, &quot;false&quot;, &quot;null&quot; and &quot;undefined&quot; will have the corresponding data types.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>If getting properties, the selected properties are cloned and returned in a JSON array. Note: these are not references into the original properties. If the requested properties are not found an empty array is returned. If removing properties, the selected properties are removed and returned in the result array without cloning. If the properties to be removed cannot be resolved, null is returned. If setting properties, the original object is returned if the properties can be successfully defined. Otherwise, null is returned.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a52f88939c5c03270beff007574b4aeb0"></a>
<div class="api">
  <div class="prototype">
    void
    mprQueueIOEvent
(<a href="#struct_mpr_wait_handler" class="ref">MprWaitHandler</a> *wp)
  </div>
  <div class="apiDetail">
<p>Queue an IO event for dispatch on the wait handler dispatcher.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Wait handler created via mprCreateWaitHandler.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1adb3d1376089ffada27656c3a69cdf74f"></a>
<div class="api">
  <div class="prototype">
    int
    mprRandom
(void )
  </div>
  <div class="apiDetail">
<p>Return a random number.</p>
    <dl><dt>Returns:</dt><dd>A random integer.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a9a5e2d48f59b4d7c88ec76cc311b0c70"></a>
<div class="api">
  <div class="prototype">
    char *
    mprReadCache
(<a href="#struct_mpr_cache" class="ref">MprCache</a> *cache, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="ref">MprTime</a> *modified, <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> *version)
  </div>
  <div class="apiDetail">
<p>Read an item from the cache.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cache</td><td>The cache instance object returned from <a class="ref" href="#mpr_8h_1a723be1009e7b9cd130cc53f2f3545e94">mprCreateCache</a></td></tr>
    <tr><td class="param">key</td><td>Cache item key.</td></tr>
    <tr><td class="param">modified</td><td>Optional MprTime value reference to receive the last modified time of the cache item. Set to null if not required.</td></tr>
    <tr><td class="param">version</td><td>Optional int64 value reference to receive the version number of the cache item. Set to null if not required. Cache items have a version number that is incremented every time the item is updated.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The cache item value.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a00910d0636480e6960ebbf46d58b5a2e"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprReadCmd
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, int channel, char *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> bufsize)
  </div>
  <div class="apiDetail">
<p>Make the I/O channels to send and receive data to and from the command.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    <tr><td class="param">channel</td><td>Channel number to read from. Should be either MPR_CMD_STDIN, MPR_CMD_STDOUT or MPR_CMD_STDERR.</td></tr>
    <tr><td class="param">buf</td><td>Buffer to read into.</td></tr>
    <tr><td class="param">bufsize</td><td>Size of buffer.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful. Otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5edc60c8f5b38c394accf29cd6785f96"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprReadFile
(<a href="#struct_mpr_file" class="ref">MprFile</a> *file, void *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)
  </div>
  <div class="apiDetail">
<p>Read data from a file.</p>
    <dl><dt><b>Description</b>:</dt><dd>Reads data from a file.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">file</td><td>Pointer to an <a class="ref" href="#struct_mpr_file">MprFile</a> object returned via MprOpen.</td></tr>
    <tr><td class="param">buf</td><td>Buffer to contain the read data.</td></tr>
    <tr><td class="param">size</td><td>Size of buf in characters.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The number of characters read from the file. Returns a negative MPR error code on errors.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac4d45407221833dab580a985f5683a3a"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    mprReadJson
(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)
  </div>
  <div class="apiDetail">
<p>Read a JSON property.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is a low-level simple JSON property lookup routine. It does a one-level property lookup. Use <a class="ref" href="#mpr_8h_1a870629694aae99d61e7c42724b687177">mprQueryJson</a> or mprGetJson to lookup properties that are not direct properties at the top level of the given object i.e. those that contain &quot;.&quot;.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">obj</td><td>Parsed JSON object returned by mprParseJson.</td></tr>
    <tr><td class="param">name</td><td>Name of the property to lookup.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The property value as a string. Returns NULL if a matching property is not found. Note this is a reference to the actaul JSON property value and not a clone of the value.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a38f389697501628013693b6d05f54533"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_json" class="ref">MprJson</a> *
    mprReadJsonObj
(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)
  </div>
  <div class="apiDetail">
<p>Read a JSON object.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is a low-level simple JSON property lookup routine. This does a one-level property lookup and returns the actual JSON object and not a clone. Be careful with this API. Objects returned by this API cannot be modified or inserted into another JSON object without corrupting the original JSON object. Use <a class="ref" href="#mpr_8h_1a870629694aae99d61e7c42724b687177">mprQueryJson</a> or mprGetJson to lookup properties and return a clone of the object.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">obj</td><td>Parsed JSON object returned by mprParseJson.</td></tr>
    <tr><td class="param">name</td><td>Name of the property to lookup.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The matching JSON object. Returns NULL if a matching property is not found. Note this is a reference to the actaul JSON object and not a clone of the object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a7b501e43afc333cf9c17a78964706bda"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_json" class="ref">MprJson</a> *
    mprReadJsonValue
(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value)
  </div>
  <div class="apiDetail">
<p>Read a JSON object by value.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is a low-level simple JSON property lookup routine that searches for a property in the JSON object by value. It does a one-level property lookup. Use <a class="ref" href="#mpr_8h_1a870629694aae99d61e7c42724b687177">mprQueryJson</a> or mprGetJson to lookup properties that are not direct properties at the top level of the given object i.e. those that contain &quot;.&quot;.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">obj</td><td>Parsed JSON object returned by mprParseJson.</td></tr>
    <tr><td class="param">value</td><td>Value to search for.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The JSON object or null if not found.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a3a06b0b88d6cece00b874fe2bb4102f8"></a>
<div class="api">
  <div class="prototype">
    char *
    mprReadLine
(<a href="#struct_mpr_file" class="ref">MprFile</a> *file, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> *len)
  </div>
  <div class="apiDetail">
<p>Read a line from the file.</p>
    <dl><dt><b>Description</b>:</dt><dd>Read a single line from the file. Lines are delimited by the newline character. The newline is not included in the returned buffer. This call will read lines up to the given size in length. If no newline is found, all available characters, up to size, will be returned.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">file</td><td>Pointer to an <a class="ref" href="#struct_mpr_file">MprFile</a> object returned via MprOpen.</td></tr>
    <tr><td class="param">size</td><td>Maximum number of characters in a line.</td></tr>
    <tr><td class="param">len</td><td>Pointer to an integer to hold the length of the returned string.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated string and sets *len to the number of bytes read.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aac9abd36a2e632460428af4d512ab2d0"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprReadSocket
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, void *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)
  </div>
  <div class="apiDetail">
<p>Read from a socket.</p>
    <dl><dt><b>Description</b>:</dt><dd>Read data from a socket. The read will return with whatever bytes are available. If none and the socket is in blocking mode, it will block untill there is some data available or the socket is disconnected.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    <tr><td class="param">buf</td><td>Pointer to a buffer to hold the read data.</td></tr>
    <tr><td class="param">size</td><td>Size of the buffer.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A count of bytes actually read. Return a negative MPR error code on errors.</dd></dl>
    <dl><dt>Returns:</dt><dd>Return -1 for EOF and errors. On success, return the number of bytes read. Use mprIsSocketEof to distinguision between EOF and errors.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a2b71af38b349cfb4cec0545eff22de59"></a>
<div class="api">
  <div class="prototype">
    void *
    mprRealloc
(void *ptr, <a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a> size)
  </div>
  <div class="apiDetail">
<p>Reallocate a block.</p>
    <dl><dt><b>Description</b>:</dt><dd>Reallocates a block increasing its size. If the specified size is less than the current block size, the call will ignore the request and simply return the existing block. The new memory portion is not zeroed.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ptr</td><td>Memory to reallocate. If NULL, call malloc.</td></tr>
    <tr><td class="param">size</td><td>New size of the required memory block.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a pointer to the allocated block. If memory is not available the memory exhaustion handler specified via mprCreate will be called to allow global recovery.</dd></dl>
    <dl><dt>Remarks:</dt><dd>Do not mix calls to realloc and mprRealloc.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aae5bd75d3750777971cfad687c0f9f15"></a>
<div class="api">
  <div class="prototype">
    int
    mprReapCmd
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout)
  </div>
  <div class="apiDetail">
<p>Reap the command.</p>
This waits for and collect the command exit status
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    <tr><td class="param">timeout</td><td>Time in milliseconds to wait for the command to complete and exit.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful. Otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a82f81798dcccf075cc6fc272a4abcffc"></a>
<div class="api">
  <div class="prototype">
    void
    mprRecallWaitHandler
(<a href="#struct_mpr_wait_handler" class="ref">MprWaitHandler</a> *wp)
  </div>
  <div class="apiDetail">
<p>Recall a wait handler.</p>
    <dl><dt><b>Description</b>:</dt><dd>Signal that a wait handler should be recalled at the earliest opportunity. This is useful when a protocol stack has buffered data that must be processed regardless of whether more I/O occurs.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Wait handler to recall.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ab449e3836233feee7490af3364437d15"></a>
<div class="api">
  <div class="prototype">
    void
    mprRecallWaitHandlerByFd
(<a href="#mpr_8h_1af9381320a2640ea84038579d8f143c01" class="ref">Socket</a> fd)
  </div>
  <div class="apiDetail">
<p>Recall a wait handler by fd.</p>
    <dl><dt><b>Description</b>:</dt><dd>Signal that a wait handler should be recalled at the earliest opportunity. This is useful when a protocol stack has buffered data that must be processed regardless of whether more I/O occurs.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">fd</td><td>File descriptor that matches that of a wait handler to recall.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a9e7451ec61507706a06c6c8149bebc52"></a>
<div class="api">
  <div class="prototype">
    int
    mprRefillBuf
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)
  </div>
  <div class="apiDetail">
<p>Refill the buffer with data.</p>
    <dl><dt><b>Description</b>:</dt><dd>Refill the buffer by calling the refill procedure specified via <a class="ref" href="#mpr_8h_1a7f74f8c3d5af9db8c064b365f39cae2c">mprSetBufRefillProc</a></dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful and otherwise a negative error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a4816868550ad8a21b914de2fbe720767"></a>
<div class="api">
  <div class="prototype">
    void
    mprRelease
(<a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr)
  </div>
  <div class="apiDetail">
<p>Release a memory block.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call is used to allow a memory block to be freed by the garbage collector after calling mprHold. You must NEVER use or access the memory block after calling mprRelease. The memory may be freed before the call returns, even when executing in an MPR thread.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ptr</td><td>Any memory block.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a57e8bfb292529e6ce63b21aca0543fb3"></a>
<div class="api">
  <div class="prototype">
    void
    mprReleaseBlocks
(<a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr, ...)
  </div>
  <div class="apiDetail">
<p>Release a memory blocks.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call is used to allow a memory blocks to be freed by the garbage collector after calling mprHoldBlocks. You must NEVER use or access the memory blocks after calling mprRelease. The memory may be freed before the call returns, even when executing in an MPR thread.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ptr</td><td>Any memory block.</td></tr>
    <tr><td class="param">...</td><td>Other memory blocks. Terminate the list with a NULL.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1adae3b874e39e0d5e0155d5179f1d83cc"></a>
<div class="api">
  <div class="prototype">
    void
    mprReleaseWorker
(<a href="#struct_mpr_worker" class="ref">MprWorker</a> *worker)
  </div>
  <div class="apiDetail">
<p>Release a worker thread.</p>
This releases a worker thread to be assignable to any real thread
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">worker</td><td>Worker thread reference.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a6585b0b574a517d4149b4f651973d95d"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprRemoveCache
(<a href="#struct_mpr_cache" class="ref">MprCache</a> *cache, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key)
  </div>
  <div class="apiDetail">
<p>Remove items from the cache.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cache</td><td>The cache instance object returned from <a class="ref" href="#mpr_8h_1a723be1009e7b9cd130cc53f2f3545e94">mprCreateCache</a></td></tr>
    <tr><td class="param">key</td><td>Cache item key. If set to null, then remove all keys from the cache.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the cache item was removed.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a9163bc8e37a8ff05c0c957cfcc86e02e"></a>
<div class="api">
  <div class="prototype">
    void
    mprRemoveEvent
(<a href="#struct_mpr_event" class="ref">MprEvent</a> *event)
  </div>
  <div class="apiDetail">
<p>Remove an event.</p>
    <dl><dt><b>Description</b>:</dt><dd>Remove a queued event. This is useful to remove continuous events from the event queue.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">event</td><td>Event object returned from <a class="ref" href="#mpr_8h_1abdf25e12b2bcc5c116599b639cc18d5c">mprCreateEvent</a></td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa7e9868693c4c804b2c356509dcbb798"></a>
<div class="api">
  <div class="prototype">
    int
    mprRemoveItem
(<a href="#struct_mpr_list" class="ref">MprList</a> *list, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *item)
  </div>
  <div class="apiDetail">
<p>Remove an item from the list.</p>
    <dl><dt><b>Description</b>:</dt><dd>Search for a specified item and then remove it from the list.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">list</td><td>List pointer returned from mprCreateList.</td></tr>
    <tr><td class="param">item</td><td>Item pointer to remove.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The positive index of the removed item, otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac758d5af71b0bbf943bb6a1e263a494c"></a>
<div class="api">
  <div class="prototype">
    int
    mprRemoveItemAtPos
(<a href="#struct_mpr_list" class="ref">MprList</a> *list, int index)
  </div>
  <div class="apiDetail">
<p>Remove an item from the list.</p>
    <dl><dt><b>Description</b>:</dt><dd>Removes the element specified by index, from the list. The list index is provided by mprInsertItem.</dd></dl>
    <dl><dt>Returns:</dt><dd>The positive index of the removed item, otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa148c1b0444356002340f837bfb289db"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_json" class="ref">MprJson</a> *
    mprRemoveJson
(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key)
  </div>
  <div class="apiDetail">
<p>Remove a property from a JSON object.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">obj</td><td>Parsed JSON object returned by mprParseJson.</td></tr>
    <tr><td class="param">key</td><td>Property name to remove for. This may include &quot;.&quot;. For example: &quot;settings.mode&quot;. See <a class="ref" href="#mpr_8h_1a870629694aae99d61e7c42724b687177">mprQueryJson</a> for a full description of key formats.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a JSON object array of all removed properties. Array will be empty if not qualifying properties were found and removed.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aaa5f26b2aae99acc06e9de4d4a300ff6"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_json" class="ref">MprJson</a> *
    mprRemoveJsonChild
(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="#struct_mpr_json" class="ref">MprJson</a> *child)
  </div>
  <div class="apiDetail">
<p>Remove a child from a JSON object WARNING: do not call this API when traversing the object in question using ITERATE_JSON.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">obj</td><td>Parsed JSON object returned by mprParseJson.</td></tr>
    <tr><td class="param">child</td><td>JSON child to remove.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The removed child element.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a1257962021e54d8c6156e49031b7a8ec"></a>
<div class="api">
  <div class="prototype">
    int
    mprRemoveKey
(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *key)
  </div>
  <div class="apiDetail">
<p>Remove a symbol entry from the hash table.</p>
    <dl><dt><b>Description</b>:</dt><dd>Removes a symbol entry from the symbol table. The entry is looked up via the supplied key.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">table</td><td>Symbol table returned via mprCreateHash.</td></tr>
    <tr><td class="param">key</td><td>String key of the symbol entry to delete.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns zero if successful, otherwise a negative MPR error code is returned.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a85633d8034896cf4f056caa1857bf4a8"></a>
<div class="api">
  <div class="prototype">
    int
    mprRemoveLastItem
(<a href="#struct_mpr_list" class="ref">MprList</a> *list)
  </div>
  <div class="apiDetail">
<p>Remove the last item from the list.</p>
    <dl><dt><b>Description</b>:</dt><dd>Remove the item at the highest index position.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">list</td><td>List pointer returned from mprCreateList.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The positive index of the removed item, otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a16748fa2520761d373cebe4b39be3e8e"></a>
<div class="api">
  <div class="prototype">
    int
    mprRemoveRangeOfItems
(<a href="#struct_mpr_list" class="ref">MprList</a> *list, int start, int end)
  </div>
  <div class="apiDetail">
<p>Remove a range of items from the list.</p>
    <dl><dt><b>Description</b>:</dt><dd>Remove a range of items from the list. The range is specified from the start index up to and including the end index.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">list</td><td>List pointer returned from mprCreateList.</td></tr>
    <tr><td class="param">start</td><td>Starting item index to remove (inclusive).</td></tr>
    <tr><td class="param">end</td><td>Ending item index to remove (inclusive).</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns zero if successful, otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a369beaea43886e4fdd3d4549a2c13cb7"></a>
<div class="api">
  <div class="prototype">
    void
    mprRemoveRoot
(<a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr)
  </div>
  <div class="apiDetail">
<p>Remove a memory block as a root for garbage collection.</p>
    <dl><dt><b>Description</b>:</dt><dd>The memory block should have previously been added as a root via <a class="ref" href="#mpr_8h_1a3b66bfcf86dc9f50510341e7b5490326">mprAddRoot</a></dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ptr</td><td>Any memory pointer.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a02e481047fbc58df3cf3afc31f15a2b4"></a>
<div class="api">
  <div class="prototype">
    void
    mprRemoveSocketHandler
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)
  </div>
  <div class="apiDetail">
<p>Remove a socket wait handler.</p>
    <dl><dt><b>Description</b>:</dt><dd>Removes the socket wait handler created via mprAddSocketHandler.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object created via mprCreateSocket.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a7d948c448d34a433b728c7a19aae1814"></a>
<div class="api">
  <div class="prototype">
    int
    mprRemoveStringItem
(<a href="#struct_mpr_list" class="ref">MprList</a> *list, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Remove a string item from the list.</p>
    <dl><dt><b>Description</b>:</dt><dd>Search for the first matching string and then remove it from the list.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">list</td><td>List pointer returned from mprCreateList.</td></tr>
    <tr><td class="param">str</td><td>String value to remove.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The positive index of the removed item, otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa7e94f04dd2634590ebf35d099bc3c63"></a>
<div class="api">
  <div class="prototype">
    void
    mprRemoveWaitHandler
(<a href="#struct_mpr_wait_handler" class="ref">MprWaitHandler</a> *wp)
  </div>
  <div class="apiDetail">
<p>Remove a wait handler from the wait service.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Wait handler object.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a34487f0a0ccc42698ec93d73d3c880f1"></a>
<div class="api">
  <div class="prototype">
    char *
    mprReplacePathExt
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ext)
  </div>
  <div class="apiDetail">
<p>Replace an extension to a path.</p>
    <dl><dt><b>Description</b>:</dt><dd>Remove any existing path extension and then add the given path extension.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path filename to modify.</td></tr>
    <tr><td class="param">ext</td><td>Extension to add. The extension should not have a period prefix.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Allocated string containing the resolved path.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a1919da044dd4f62d999526175f76bdc2"></a>
<div class="api">
  <div class="prototype">
    void
    mprRescheduleEvent
(<a href="#struct_mpr_event" class="ref">MprEvent</a> *event, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> period)
  </div>
  <div class="apiDetail">
<p>Reschedule an event.</p>
    <dl><dt><b>Description</b>:</dt><dd>Reschedule a continuous event by modifying its period.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">event</td><td>Event object returned from <a class="ref" href="#mpr_8h_1abdf25e12b2bcc5c116599b639cc18d5c">mprCreateEvent</a></td></tr>
    <tr><td class="param">period</td><td>Time in milliseconds used by continuous events between firing of the event.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ae6f9d70c3aab3eb2d9235a1c2a8f63a8"></a>
<div class="api">
  <div class="prototype">
    void
    mprResetBufIfEmpty
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf)
  </div>
  <div class="apiDetail">
<p>Reset the buffer.</p>
    <dl><dt><b>Description</b>:</dt><dd>If the buffer is empty, reset the buffer start and end pointers to the beginning of the buffer.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a3db47bdecb58c2c52197d625377cf71b"></a>
<div class="api">
  <div class="prototype">
    void
    mprResetCond
(<a href="#struct_mpr_cond" class="ref">MprCond</a> *cond)
  </div>
  <div class="apiDetail">
<p>Reset a condition variable.</p>
This sets the condition variable to the unsignalled condition
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cond</td><td>Condition variable object created via <a class="ref" href="#mpr_8h_1a563cf7257bd5ed5d1024cd457bae598f">mprCreateCond</a></td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a0d6ef2dfceedfe111eb55bc88c4435ba"></a>
<div class="api">
  <div class="prototype">
    void
    mprResetMemError
(void )
  </div>
  <div class="apiDetail">
<p>Reset the memory allocation error flag.</p>
    <dl><dt><b>Description</b>:</dt><dd>Reset the alloc error flag triggered.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa4bf0d2c9a7c854dcb9edc83035c84ba"></a>
<div class="api">
  <div class="prototype">
    void
    mprResetYield
(void )
  </div>
  <div class="apiDetail">
<p>Reset a sticky yield.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call resets a sticky yield established with <a class="ref" href="#mpr_8h_1af140a2fda18b2e8461236cc44c0a2cc4">mprYield</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5cae743a4ae7f3b84630581282358160"></a>
<div class="api">
  <div class="prototype">
    char *
    mprResolvePath
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *base, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Resolve paths.</p>
    <dl><dt><b>Description</b>:</dt><dd>Resolve paths in the neighborhood of this path. Resolve operates like join, except that it joins the given paths to the directory portion of the current (&quot;this&quot;) path. For example: Path(&quot;/usr/bin/ejs/bin&quot;).resolve(&quot;lib&quot;) will return &quot;/usr/lib/ejs/lib&quot;. i.e. it will return the sibling directory &quot;lib&quot;. <br/><br/>
Resolve operates by determining a virtual current directory for this Path object. It then successively joins the given paths to the directory portion of the current result. If the next path is an absolute path, it is used unmodified. The effect is to find the given paths with a virtual current directory set to the directory containing the prior path. <br/><br/>
Resolve is useful for creating paths in the region of the current path and gracefully handles both absolute and relative path segments. <br/><br/>
Returns a joined (normalized) path. If path is absolute, then return path. If path is null, empty or &quot;.&quot; then return path.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">base</td><td>Base path to use as the base.</td></tr>
    <tr><td class="param">path</td><td>Path name to resolve against base.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Allocated string containing the resolved path.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1acce9cdb4178a693af784d4b37a862665"></a>
<div class="api">
  <div class="prototype">
    void
    mprRestart
(void )
  </div>
  <div class="apiDetail">
<p>Restart the application.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call immediately restarts the application. The standard input, output and error I/O channels are preserved. All other open file descriptors are closed. <br/><br/>
If the application is started via a monitoring launch daemon such as launchd or appman, the application should not use this API, but rather defer to the launch daemon to restart the application. In that case, the application should simply do a shutdown via <a class="ref" href="#mpr_8h_1a2836549ee05ea1901a64a26e51f8ed86">mprShutdown</a> and/or <a class="ref" href="#mpr_8h_1a4f36e049582f33f7384fd5648db77a2a">mprDestroy</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a6fa51ab06c56baaad50f1b4df7efc1d4"></a>
<div class="api">
  <div class="prototype">
    void
    mprRestartContinuousEvent
(<a href="#struct_mpr_event" class="ref">MprEvent</a> *event)
  </div>
  <div class="apiDetail">
<p>Restart an event.</p>
    <dl><dt><b>Description</b>:</dt><dd>Restart a continuous event after it has been stopped via <a class="ref" href="#mpr_8h_1a1f2c85a20242ec0c1e4830ccd25c7bb7">mprStopContinuousEvent</a>. This call will add the event to the event queue and it will run after the configured event period has expired.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">event</td><td>Event object returned from <a class="ref" href="#mpr_8h_1abdf25e12b2bcc5c116599b639cc18d5c">mprCreateEvent</a></td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a03f3b71716eefb236c7a88a4a92acbe4"></a>
<div class="api">
  <div class="prototype">
    int
    mprRun
(<a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *command, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *input, char **output, char **error, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout)
  </div>
  <div class="apiDetail">
<p>Run a simple blocking command using a string command line.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">dispatcher</td><td><a class="ref" href="#struct_mpr_dispatcher">MprDispatcher</a> event queue to use for waiting. Set to NULL to use the default MPR dispatcher.</td></tr>
    <tr><td class="param">command</td><td>Command line to run.</td></tr>
    <tr><td class="param">input</td><td>Command input. Data to write to the command which will be received on the comamnds stdin.</td></tr>
    <tr><td class="param">output</td><td>Reference to a string to receive the stdout from the command.</td></tr>
    <tr><td class="param">error</td><td>Reference to a string to receive the stderr from the command.</td></tr>
    <tr><td class="param">timeout</td><td>Time in milliseconds to wait for the command to complete and exit. Set to -1 to wait forever.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Command exit status, or negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aea3178396a249792e696eb04ee9df3ba"></a>
<div class="api">
  <div class="prototype">
    int
    mprRunCmd
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *command, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> **envp, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *in, char **out, char **err, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout, int flags)
  </div>
  <div class="apiDetail">
<p>Run a command using a string command line.</p>
This starts the command via
mprStartCmd()
and waits for its completion
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    <tr><td class="param">command</td><td>Command line to run.</td></tr>
    <tr><td class="param">envp</td><td>Array of environment strings. Each environment string should be of the form: &quot;KEY=VALUE&quot;. The array must be null terminated.</td></tr>
    <tr><td class="param">in</td><td>Command input. Data to write to the command which will be received on the comamnds stdin.</td></tr>
    <tr><td class="param">out</td><td>Reference to a string to receive the stdout from the command.</td></tr>
    <tr><td class="param">err</td><td>Reference to a string to receive the stderr from the command.</td></tr>
    <tr><td class="param">timeout</td><td>Time in milliseconds to wait for the command to complete and exit.</td></tr>
    <tr><td class="param">flags</td><td>Flags to modify execution. Valid flags are: MPR_CMD_NEW_SESSION Create a new session on Unix MPR_CMD_SHOW Show the commands window on Windows MPR_CMD_IN Connect to stdin MPR_CMD_OUT Capture stdout MPR_CMD_ERR Capture stderr MPR_CMD_EXACT_ENV Use the exact environment supplied. Don&apos;t inherit and blend with existing environment.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Command exit status, or negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a40c6d3c5980dd3db76189fa6ee38874a"></a>
<div class="api">
  <div class="prototype">
    int
    mprRunCmdV
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, int argc, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> **argv, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> **envp, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *in, char **out, char **err, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout, int flags)
  </div>
  <div class="apiDetail">
<p>Run a command using an argv[] array of arguments.</p>
This invokes
mprStartCmd()
and waits for its completion
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    <tr><td class="param">argc</td><td>Count of arguments in argv.</td></tr>
    <tr><td class="param">argv</td><td>Command arguments array.</td></tr>
    <tr><td class="param">envp</td><td>Array of environment strings. Each environment string should be of the form: &quot;KEY=VALUE&quot;. The array must be null terminated.</td></tr>
    <tr><td class="param">in</td><td>Command input. Data to write to the command which will be received on the comamnds stdin.</td></tr>
    <tr><td class="param">out</td><td>Reference to a string to receive the stdout from the command.</td></tr>
    <tr><td class="param">err</td><td>Reference to a string to receive the stderr from the command.</td></tr>
    <tr><td class="param">timeout</td><td>Time in milliseconds to wait for the command to complete and exit.</td></tr>
    <tr><td class="param">flags</td><td>Flags to modify execution. Valid flags are: MPR_CMD_NEW_SESSION Create a new session on Unix MPR_CMD_SHOW Show the commands window on Windows MPR_CMD_IN Connect to stdin MPR_CMD_OUT Capture stdout MPR_CMD_ERR Capture stderr.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful. Otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a05f5c0032fd356cf18c2580ffb37be4d"></a>
<div class="api">
  <div class="prototype">
    int
    mprSamePath
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path1, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path2)
  </div>
  <div class="apiDetail">
<p>Compare two paths if they are the same.</p>
    <dl><dt><b>Description</b>:</dt><dd>Compare two paths to see if they are equal. This normalizes the paths to absolute paths first before comparing. It does handle case sensitivity appropriately.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path1</td><td>First path to compare.</td></tr>
    <tr><td class="param">path2</td><td>Second path to compare.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the file exists and can be accessed.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aefab5559ec726c9e2d08e20211177249"></a>
<div class="api">
  <div class="prototype">
    int
    mprSamePathCount
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path1, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path2, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
  </div>
  <div class="apiDetail">
<p>Compare two paths if they are the same for a given length.</p>
    <dl><dt><b>Description</b>:</dt><dd>Compare two paths to see if they are equal. This normalizes the paths to absolute paths first before comparing. It does handle case sensitivity appropriately. The len parameter if non-zero, specifies how many characters of the paths to compare.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path1</td><td>First path to compare.</td></tr>
    <tr><td class="param">path2</td><td>Second path to compare.</td></tr>
    <tr><td class="param">len</td><td>How many characters to compare.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the file exists and can be accessed.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5008430f9a6c74ab8c94f9b081670fbc"></a>
<div class="api">
  <div class="prototype">
    int
    mprSaveJson
(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, int flags)
  </div>
  <div class="apiDetail">
<p>Save a JSON object to a filename.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">obj</td><td>Parsed JSON object returned by mprParseJson.</td></tr>
    <tr><td class="param">path</td><td>Filename path to contain the saved JSON string.</td></tr>
    <tr><td class="param">flags</td><td>Same flags as for <a class="ref" href="#mpr_8h_1a40fe70c168712e6e9b6d89dd84ca1113">mprJsonToString</a>: MPR_JSON_PRETTY, MPR_JSON_QUOTES, MPR_JSON_STRINGS.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a702d78826b619870746315bf551ad44c"></a>
<div class="api">
  <div class="prototype">
    char *
    mprSearchForModule
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *module)
  </div>
  <div class="apiDetail">
<p>Search for a module on the current module path.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">module</td><td>Name of the module to locate.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A string containing the full path to the module. Returns NULL if the module filename cannot be found.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a2294ad095d30050d31289b2b722f8f9a"></a>
<div class="api">
  <div class="prototype">
    char *
    mprSearchPath
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, int flags, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *search, ...)
  </div>
  <div class="apiDetail">
<p>Search for a path.</p>
    <dl><dt><b>Description</b>:</dt><dd>Search for a file using a given set of search directories.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path name to locate. Must be an existing file or directory.</td></tr>
    <tr><td class="param">flags</td><td>Flags.</td></tr>
    <tr><td class="param">search</td><td>Variable number of directories to search.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Allocated string containing the full path name of the located file.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aaddd841fab4eb81ea0cefed2c24b5d1c"></a>
<div class="api">
  <div class="prototype">
    <a href="#mpr_8h_1a87e9f435008723c7b1489af1944c6e20" class="ref">MprOff</a>
    mprSeekFile
(<a href="#struct_mpr_file" class="ref">MprFile</a> *file, int seekType, <a href="#mpr_8h_1a87e9f435008723c7b1489af1944c6e20" class="ref">MprOff</a> distance)
  </div>
  <div class="apiDetail">
<p>Seek the I/O pointer to a new location in the file.</p>
    <dl><dt><b>Description</b>:</dt><dd>Move the position in the file to/from which I/O will be performed in the file. Seeking prior to a read or write will cause the next I/O to occur at that location.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">file</td><td>Pointer to an <a class="ref" href="#struct_mpr_file">MprFile</a> object returned via MprOpen.</td></tr>
    <tr><td class="param">seekType</td><td>Seek type may be one of the following three values: <ul><li>SEEK_SET Seek to a position relative to the start of the file </li><li>SEEK_CUR Seek relative to the current position </li><li>SEEK_END Seek relative to the end of the file </li></ul></td></tr>
    <tr><td class="param">distance</td><td>A positive or negative byte offset.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The new file position if successful otherwise a negative MPR error code is returned.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a8959f22b309ae567b81cb45433e4e04a"></a>
<div class="api">
  <div class="prototype">
    char *
    mprSerialize
(<a href="#struct_mpr_hash" class="ref">MprHash</a> *hash, int flags)
  </div>
  <div class="apiDetail">
<p>Serialize a hash of properties as a JSON string.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">hash</td><td>Hash of properties to examine.</td></tr>
    <tr><td class="param">flags</td><td>Serialization flags. Supported flags include MPR_JSON_PRETTY for a human-readable multiline format. MPR_JSON_QUOTES to wrap property names in quotes. Use MPR_JSON_STRINGS to emit all property values as quoted strings.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>JSON string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a205adaee3b45d0cc899afc89eb9f3b3d"></a>
<div class="api">
  <div class="prototype">
    int
    mprServiceEvents
(<a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> delay, int flags)
  </div>
  <div class="apiDetail">
<p>Service events.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call services events on all dispatchers and services I/O events. An app should dedicate one and only one thread to be an event service thread. That thread should call mprServiceEvents from the top-level. <br/><br/>
This call will service events until the timeout expires or if MPR_SERVICE_NO_BLOCK is specified in flags, until there are no more events to service. This routine will also return if the MPR has been instructed to terminate and is stopping. Calling mprServiceE <br/><br/>
Application event code that is running off a dispatcher should never call mprServiceEvents recursively. Rather, the event code should call <a class="ref" href="#mpr_8h_1aa523c291209f9419ad27f8b7be4e231d">mprWaitForEvent</a> if it needs to wait while servicing events on its own dispatcher.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">delay</td><td>Time in milliseconds to wait. Set to zero for no wait. Set to -1 to wait forever.</td></tr>
    <tr><td class="param">flags</td><td>If set to MPR_SERVICE_NO_BLOCK, this call will service all due events without blocking. Otherwise set to zero.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The number of events serviced. Returns MPR_ERR_BUSY is another thread is servicing events. Returns when the MPR is stopping or if the timeout expires or if MPR_SERVICE_NO_BLOCK is specified and there are no more events to service.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a8f997de03358e990de88e7e952b48641"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprServicesAreIdle
(<a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> traceRequests)
  </div>
  <div class="apiDetail">
<p>Determine if the MPR services.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is the default routine invoked by <a class="ref" href="#mpr_8h_1aa07c03ff5f586d99e46ad8bc7b519eba">mprIsIdle()</a></dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">traceRequests</td><td>If true, emit trace regarding running requests.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the MPR services are idle.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ad48220b7862b645de3920d74aa9b011e"></a>
<div class="api">
  <div class="prototype">
    int
    mprSetAppName
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *title, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *version)
  </div>
  <div class="apiDetail">
<p>Set the application name, title and version.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">name</td><td>One word, lower case name for the app.</td></tr>
    <tr><td class="param">title</td><td>Pascal case multi-word descriptive name.</td></tr>
    <tr><td class="param">version</td><td>Version of the app. Major-Minor-Patch. E.g. 1.2.3.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful. Otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a6ba839ff6e8b6e4cfa5c17ad6356d9ac"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetAppPath
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Set the application executable path.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>A string containing the application executable path.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1affa4e80d4cc95a6816bfe84767d11e2f"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetBufMax
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> maxSize)
  </div>
  <div class="apiDetail">
<p>Set the maximum buffer size.</p>
    <dl><dt><b>Description</b>:</dt><dd>Update the maximum buffer size set when the buffer was created.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    <tr><td class="param">maxSize</td><td>New maximum size the buffer can grow to.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a7f74f8c3d5af9db8c064b365f39cae2c"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetBufRefillProc
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, <a href="#mpr_8h_1ac1eae8096b0311d63a3fba54015bf1b9" class="ref">MprBufProc</a> fn, void *arg)
  </div>
  <div class="apiDetail">
<p>Set the buffer refill procedure.</p>
    <dl><dt><b>Description</b>:</dt><dd>Define a buffer refill procedure. The <a class="ref" href="#struct_mpr_buf">MprBuf</a> module will not invoke or manage this refill procedure. It is simply stored to allow upper layers to use and provide their own auto-refill mechanism.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    <tr><td class="param">fn</td><td>Callback function to store.</td></tr>
    <tr><td class="param">arg</td><td>Callback data argument.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ab72f5c9cc154767c1b299f665237d6a6"></a>
<div class="api">
  <div class="prototype">
    int
    mprSetBufSize
(<a href="#struct_mpr_buf" class="ref">MprBuf</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> maxSize)
  </div>
  <div class="apiDetail">
<p>Set the buffer size.</p>
    <dl><dt><b>Description</b>:</dt><dd>Set the current buffer content size and maximum size limit. Setting a current size will immediately grow the buffer to be this size. If the size is less than the current buffer size, the requested size will be ignored. ie. this call will not shrink the buffer. Setting a maxSize will define a maximum limit for how big the buffer contents can grow. Set either argument to -1 to be ignored.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Buffer created via mprCreateBuf.</td></tr>
    <tr><td class="param">size</td><td>Size to immediately make the buffer. If size is less than the current buffer size, it will be ignored. Set to -1 to ignore this parameter.</td></tr>
    <tr><td class="param">maxSize</td><td>Maximum size the buffer contents can grow to.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful and otherwise a negative error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac79a433b92c0e81df3b282345eef07ad"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetCacheLimits
(<a href="#struct_mpr_cache" class="ref">MprCache</a> *cache, <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> keys, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> lifespan, <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> memory, int resolution)
  </div>
  <div class="apiDetail">
<p>Set the cache resource limits.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cache</td><td>The cache instance object returned from <a class="ref" href="#mpr_8h_1a723be1009e7b9cd130cc53f2f3545e94">mprCreateCache</a></td></tr>
    <tr><td class="param">keys</td><td>Set the maximum number of keys the cache can store.</td></tr>
    <tr><td class="param">lifespan</td><td>Set the default lifespan for cache items in milliseconds.</td></tr>
    <tr><td class="param">memory</td><td>Memory limit in bytes for all cache keys and items.</td></tr>
    <tr><td class="param">resolution</td><td>Set the cache item pruner resolution. This defines how frequently the cache manager will check items for expiration.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aaa3c0cea1ad910b3fb83dc7800b46b95"></a>
<div class="api">
  <div class="prototype">
    int
    mprSetCacheLink
(<a href="#struct_mpr_cache" class="ref">MprCache</a> *cache, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, void *link)
  </div>
  <div class="apiDetail">
<p>Set a linked managed memory reference for a cached item.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cache</td><td>The cache instance object returned from <a class="ref" href="#mpr_8h_1a723be1009e7b9cd130cc53f2f3545e94">mprCreateCache</a></td></tr>
    <tr><td class="param">key</td><td>Cache item key to write.</td></tr>
    <tr><td class="param">link</td><td>Managed memory reference. May be NULL.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ab0a5564222ed33ad6fd3e4ccbeb78aef"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetCacheNotify
(<a href="#struct_mpr_cache" class="ref">MprCache</a> *cache, <a href="#mpr_8h_1af96182122f42e2c56539fb35594f985c" class="ref">MprCacheProc</a> notify)
  </div>
  <div class="apiDetail">
<p>Set a notification callback to be invoked for events of interest on cached items.</p>
WARNING: the callback may happen on any thread. Use careful locking to synchronize access to data. Take care not to block the thread issuing the callback
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cache</td><td>The cache instance object returned from <a class="ref" href="#mpr_8h_1a723be1009e7b9cd130cc53f2f3545e94">mprCreateCache</a></td></tr>
    <tr><td class="param">notify</td><td>MprCacheProc notification callback. Invoked for events of interest on cache items. The event is set to MPR_CACHE_NOTIFY_REMOVE when items are removed from the cache. Invoked as:.</td></tr>
    </table></dd></dl>
(*MprCacheProc)(
MprCache
*cache, cchar *key, cchar *data, int event);
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a8288e08dc7387c14e0536d214eba6049"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetCmdCallback
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, <a href="#mpr_8h_1a078fd5619ce8db80dab30bc99016f17b" class="ref">MprCmdProc</a> callback, void *data)
  </div>
  <div class="apiDetail">
<p>Define a callback to be invoked to receive response data from the command.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    <tr><td class="param">callback</td><td>Function of the signature MprCmdProc which will be invoked for receive notification for data from the commands stdout and stderr channels. MprCmdProc has the signature: int callback(MprCmd *cmd, int channel, void *data) {}.</td></tr>
    <tr><td class="param">data</td><td>User defined data to be passed to the callback.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a9f86aee08df0e092359a9d2ed662f856"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetCmdDefaultEnv
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> **env)
  </div>
  <div class="apiDetail">
<p>Set the default environment to use for commands.</p>
    <dl><dt><b>Description</b>:</dt><dd>This environment is used if one is not defined via <a class="ref" href="#mpr_8h_1a120e7a3a3a571b9520853e31d9ce6021">mprStartCmd</a></dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    <tr><td class="param">env</td><td>Array of environment &quot;KEY=VALUE&quot; strings. Null terminated.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa0e753a2136410b79e480713aaf97b89"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetCmdDir
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *dir)
  </div>
  <div class="apiDetail">
<p>Set the home directory for the command.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    <tr><td class="param">dir</td><td>String directory path name.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a731bf3b3b53862f42249d5a771107363"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetCmdEnv
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> **env)
  </div>
  <div class="apiDetail">
<p>Set the command environment.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    <tr><td class="param">env</td><td>Array of environment strings. Each environment string should be of the form: &quot;KEY=VALUE&quot;. The array must be null terminated.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a0cf82b3bc13e3e4da2bc35526720e913"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprSetCmdlineLogging
(<a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> on)
  </div>
  <div class="apiDetail">
<p>Set if command line logging was requested.</p>
    <dl><dt><b>Description</b>:</dt><dd>Logging may be initiated by invoking an MPR based program with a &quot;&mdash;log&quot; switch. This API assists programs to tell the MPR that command line logging has been used.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">on</td><td>Set to true to indicate command line logging is being used.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if command line logging was enabled before this call.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a8810126341868790cc02a34e4a0833ec"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetCmdSearchPath
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *search)
  </div>
  <div class="apiDetail">
<p>Set the default command search path.</p>
    <dl><dt><b>Description</b>:</dt><dd>The search path is used to locate the program to run for the command.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    <tr><td class="param">search</td><td>Search string. This is in a format similar to the PATH environment variable.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1acb25fd80b4d560d2c347ae8a692de0f1"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetDebugMode
(<a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> on)
  </div>
  <div class="apiDetail">
<p>Turn on debug mode.</p>
    <dl><dt><b>Description</b>:</dt><dd>Debug mode disables timeouts and timers. This makes debugging much easier.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">on</td><td>Set to true to enable debugging mode.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a9dbc9553237fd2af50c9cf7e19f3045a"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetDomainName
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s)
  </div>
  <div class="apiDetail">
<p>Set the application domain name string.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">s</td><td>New value to use for the application domain name.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa335e1d324029029795409a9a857dbdf"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetEnv
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value)
  </div>
  <div class="apiDetail">
<p>Set an environment variable value.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">key</td><td>Variable name.</td></tr>
    <tr><td class="param">value</td><td>Variable value.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a85f5df7ec845e2748c1ce3dd4afc64ce"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetError
(int error)
  </div>
  <div class="apiDetail">
<p>Set the error code.</p>
    <dl><dt><b>Description</b>:</dt><dd>Set errno or equivalent.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aecca029381f63b1dbd33b5df3556cc3d"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetEventServiceSleep
(<a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> delay)
  </div>
  <div class="apiDetail">
<p>Set the maximum sleep time for the event service.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">delay</td><td>Maximum time to sleep before checking for events to service.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af879e1101793951172696115c02ca346"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetExitStatus
(int status)
  </div>
  <div class="apiDetail">
<p>Set the proposed exit status.</p>
    <dl><dt><b>Description</b>:</dt><dd>Set the exit status that can be retrieved via <a class="ref" href="#mpr_8h_1a6dcbec55f8e4ba71d582bf0308ee7acd">mprGetExitStatus</a></dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">status</td><td>Proposed exit status value.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a278ee775a1c2e956d09a4683e778caea"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetExitTimeout
(<a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout)
  </div>
  <div class="apiDetail">
<p>Set the exit timeout for a shutdown.</p>
    <dl><dt><b>Description</b>:</dt><dd>A shutdown waits for existing requests to complete before exiting. After this timeout has expired, the application will either invoke exit() or cancel the shutdown depending on whether MPR_EXIT_SAFE is defined in the exit strategy via <a class="ref" href="#mpr_8h_1a2836549ee05ea1901a64a26e51f8ed86">mprShutdown</a>. The default exit timeout is zero.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">timeout</td><td>Time in milliseconds to wait for current requests to complete and the application to become idle.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a53dd3e2813e09afdeca537bd1a8584c8"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetFilesLimit
(int limit)
  </div>
  <div class="apiDetail">
<p>Set the maximum number of open file/socket descriptors.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">limit</td><td>Limit to enforce.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af61307049c58bbb253244babc9d5a6b1"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetHostName
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s)
  </div>
  <div class="apiDetail">
<p>Set the application host name string.</p>
This is internal to the application and does not affect the O/S host name
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">s</td><td>New host name to use within the application.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a829517ad9c44a5a377f3d70928c6d9c2"></a>
<div class="api">
  <div class="prototype">
    <a href="#mpr_8h_1a04047ab092be560a73185e083baccf4f" class="ref">MprIdleCallback</a>
    mprSetIdleCallback
(<a href="#mpr_8h_1a04047ab092be560a73185e083baccf4f" class="ref">MprIdleCallback</a> idleCallback)
  </div>
  <div class="apiDetail">
<p>Define a new idle callback to be invoked by <a class="ref" href="#mpr_8h_1aa07c03ff5f586d99e46ad8bc7b519eba">mprIsIdle()</a></p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">idleCallback</td><td>Callback function to invoke to test if the application is idle.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a1fa92eb8cb9bf4f023f4f60f57001abc"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetIpAddr
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ip)
  </div>
  <div class="apiDetail">
<p>Sete the application IP address string.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ip</td><td>IP address string to store for the application.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a9f47ecd1bfa2a2ef8f530fc395a10950"></a>
<div class="api">
  <div class="prototype">
    void *
    mprSetItem
(<a href="#struct_mpr_list" class="ref">MprList</a> *list, int index, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *item)
  </div>
  <div class="apiDetail">
<p>Set a list item.</p>
    <dl><dt><b>Description</b>:</dt><dd>Update the list item stored at the specified index.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">list</td><td>List pointer returned from mprCreateList.</td></tr>
    <tr><td class="param">index</td><td>Location to update.</td></tr>
    <tr><td class="param">item</td><td>Pointer to item to store.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The old item previously at that location index.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa19ca22bc6745f7d28d295dfe8dffb15"></a>
<div class="api">
  <div class="prototype">
    int
    mprSetJson
(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value, int type)
  </div>
  <div class="apiDetail">
<p>Update a key/value in the JSON object with a string value.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call takes a multipart property name and will operate at any level of depth in the JSON object. This routine supports the mprQueryJson key syntax.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">obj</td><td>Parsed JSON object returned by mprParseJson.</td></tr>
    <tr><td class="param">key</td><td>Property name to add/update. This may include &quot;.&quot; and the full mprQueryJson syntax. For example: &quot;settings.mode&quot;. See <a class="ref" href="#mpr_8h_1a870629694aae99d61e7c42724b687177">mprQueryJson</a> for a full description of key formats.</td></tr>
    <tr><td class="param">value</td><td>Character string value.</td></tr>
    <tr><td class="param">type</td><td>Set to MPR_JSON_FALSE, MPR_JSON_NULL, MPR_JSON_NUMBER, MPR_JSON_STRING, MPR_JSON_TRUE, MPR_JSON_UNDEFINED.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if updated successfully.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5cbd801cd3f61932e4e7273b0cfada2e"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetJsonError
(<a href="#struct_mpr_json_parser" class="ref">MprJsonParser</a> *jp, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
  </div>
  <div class="apiDetail">
<p>Signal a parse error in the JSON input stream.</p>
    <dl><dt><b>Description</b>:</dt><dd>JSON callback functions will invoke mprSetJsonError when JSON parse or data semantic errors are encountered. This routine may be called by the user JSON parse callback to emit a custom parse error notification.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">jp</td><td>JSON control structure.</td></tr>
    <tr><td class="param">fmt</td><td>Printf style format string.</td></tr>
    <tr><td class="param">...</td><td>Printf arguments.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a23d9bdbb739d0a21de0e0bbc98e6ee03"></a>
<div class="api">
  <div class="prototype">
    void int
    mprSetJsonObj
(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="#struct_mpr_json" class="ref">MprJson</a> *value)
  </div>
  <div class="apiDetail">
<p>Update a property in a JSON object.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call takes a multipart property name and will operate at any level of depth in the JSON object.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">obj</td><td>Parsed JSON object returned by mprParseJson.</td></tr>
    <tr><td class="param">key</td><td>Property name to add/update. This may include &quot;.&quot;. For example: &quot;settings.mode&quot;. See <a class="ref" href="#mpr_8h_1a870629694aae99d61e7c42724b687177">mprQueryJson</a> for a full description of key formats.</td></tr>
    <tr><td class="param">value</td><td>Property value to set.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if updated successfully.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a8a1f63942d93420121a18e0cf5a56d91"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetKey
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, void *value)
  </div>
  <div class="apiDetail">
<p>Store a key/value pair.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">key</td><td>String key value.</td></tr>
    <tr><td class="param">value</td><td>Manage object reference.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a38bd862a8bc3076d86b0185d5bd81aa6"></a>
<div class="api">
  <div class="prototype">
    int
    mprSetListLimits
(<a href="#struct_mpr_list" class="ref">MprList</a> *list, int initialSize, int maxSize)
  </div>
  <div class="apiDetail">
<p>Define the list size limits.</p>
    <dl><dt><b>Description</b>:</dt><dd>Define the list initial size and maximum size it can grow to.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">list</td><td>List pointer returned from mprCreateList.</td></tr>
    <tr><td class="param">initialSize</td><td>Initial size for the list. This call will allocate space for at least this number of items.</td></tr>
    <tr><td class="param">maxSize</td><td>Set the maximum limit the list can grow to become.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns zero if successful, otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ad1c46a00821497d3146925dde1980791"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetLogBackup
(<a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> logSize, int backupCount, int flags)
  </div>
  <div class="apiDetail">
<p>Set the log rotation parameters.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">logSize</td><td>If the size is zero, then the log file will be rotated on each application boot. Otherwise, the log file will be rotated if on application boot, the log file is larger than this size.</td></tr>
    <tr><td class="param">backupCount</td><td>Count of the number of log files to keep.</td></tr>
    <tr><td class="param">flags</td><td>Set to MPR_LOG_ANEW to truncate existing files (after backup).</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a02941fa13af43f80adda4840d94f215b"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetLogFile
(struct MprFile *file)
  </div>
  <div class="apiDetail">
<p>Set a file to be used for logging.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">file</td><td><a class="ref" href="#struct_mpr_file">MprFile</a> object instance.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a834e7ceec5efa68d0d73eb45c3c69780"></a>
<div class="api">
  <div class="prototype">
    <a href="#mpr_8h_1a8fdb97b78014d2a084a4747a35b3235a" class="ref">MprLogHandler</a>
    mprSetLogHandler
(<a href="#mpr_8h_1a8fdb97b78014d2a084a4747a35b3235a" class="ref">MprLogHandler</a> handler)
  </div>
  <div class="apiDetail">
<p>Set an MPR debug log handler.</p>
    <dl><dt><b>Description</b>:</dt><dd>Defines a callback handler for MPR debug and error log messages. When output is sent to the debug channel, the log handler will be invoked to accept the output message.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">handler</td><td>Callback handler.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Prior log handler.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5072dbfb7278b3247096146ead8b7162"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetLogLevel
(int level)
  </div>
  <div class="apiDetail">
<p>Set the current logging verbosity level.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call defines the maximum level of messages that will be logged. Calls to mprLog specify a message level. If the message level is greater than the defined logging level, the message is ignored.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">level</td><td>New logging level. Must be 0-5 inclusive.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac16b2cfc057a6df9c6012a9005edf64d"></a>
<div class="api">
  <div class="prototype">
    void *
    mprSetManager
(void *ptr, <a href="#mpr_8h_1ad5e84d898dd29853b54cc1b49fcb4041" class="ref">MprManager</a> manager)
  </div>
  <div class="apiDetail">
<p>Update the manager for a block of memory.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call updates the manager for a block of memory allocated via mprAllocWithManager.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ptr</td><td>Memory to free. If NULL, take no action.</td></tr>
    <tr><td class="param">manager</td><td>Manager function to invoke when the memory is released.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The original object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ad69af558283f6f1f3277ae9e77029017"></a>
<div class="api">
  <div class="prototype">
    int
    mprSetMaxSocketAccept
(int max)
  </div>
  <div class="apiDetail">
<p>Set the maximum number of accepted client connections that are permissable.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">max</td><td>New maximum number of accepted client connections.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a9982a2441762d3a7f82c01c1c5be4476"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetMaxWorkers
(int count)
  </div>
  <div class="apiDetail">
<p>Set the maximum count of worker threads Set the maximum number of worker pool threads for the MPR.</p>
If this number if less than the current number of threads, excess threads will be gracefully pruned as they exit
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">count</td><td>Maximum limit of threads to define.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ae50c8f8027adb12b70482afa8b3b979f"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetMemError
(void )
  </div>
  <div class="apiDetail">
<p>Set an memory allocation error condition on a memory context.</p>
This will set an allocation error condition on the given context and all its parents. This way, you can test the ultimate parent and detect if any memory allocation errors have occurred
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ab0b7e384d28606a450f21bc50a8b0c12"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetMemLimits
(<a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> warnHeap, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> maximum, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> cache)
  </div>
  <div class="apiDetail">
<p>Configure the application memory limits.</p>
    <dl><dt><b>Description</b>:</dt><dd>Configure memory limits to constrain memory usage by the application. The memory allocation subsystem will check these limits before granting memory allocation requrests. The warnHeap is a soft limit that if exceeded will invoke the memory allocation callback, but will still honor the request. The maximum limit is a hard limit. The MPR will prevent allocations which exceed this maximum. The memory callback handler is defined via the <a class="ref" href="#mpr_8h_1a000f7f94708664e292b1bddeb69a7996">mprCreate</a> call.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">warnHeap</td><td>Soft memory limit. If exceeded, the request will be granted, but the memory handler will be invoked. to issue a warning and potentially take remedial acation. If -1, then do not update the warnHeap.</td></tr>
    <tr><td class="param">maximum</td><td>Hard memory limit. If exceeded, the request will not be granted, and the memory handler will be invoked. If -1, then do not update the maximum.</td></tr>
    <tr><td class="param">cache</td><td>Heap cache. Try to keep at least this amount of memory in the heap free queues If -1, then do not update the cache.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a32742d6a82477fabee9c821138ffd824"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetMemNotifier
(<a href="#mpr_8h_1ac7be61c63c8a92243c67986431c48083" class="ref">MprMemNotifier</a> cback)
  </div>
  <div class="apiDetail">
<p>Define a memory notifier.</p>
    <dl><dt><b>Description</b>:</dt><dd>A notifier callback will be invoked for memory allocation errors for the given memory context.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cback</td><td>Notifier callback function.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a282926d76d53bde980ec5f5c5004a3b3"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetMemPolicy
(int policy)
  </div>
  <div class="apiDetail">
<p>Set the memory allocation policy for when allocations fail.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">policy</td><td>Set to MPR_ALLOC_POLICY_EXIT for the application to immediately exit on memory allocation errors. Set to MPR_ALLOC_POLICY_RESTART to restart the appplication on memory allocation errors.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5f1165a45b9a43aed99b1e25900b0fbd"></a>
<div class="api">
  <div class="prototype">
    int
    mprSetMimeProgram
(<a href="#struct_mpr_hash" class="ref">MprHash</a> *table, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *mimeType, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *program)
  </div>
  <div class="apiDetail">
<p>Set the mime type program.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">table</td><td>type hash table returned by <a class="ref" href="#mpr_8h_1aa2c27762b461480e0fa9e8e5090e0d66">mprCreateMimeTypes</a></td></tr>
    <tr><td class="param">mimeType</td><td>Mime type to update.</td></tr>
    <tr><td class="param">program</td><td>Program name to associate with this mime type.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if the update is successful. Otherwise return MPR_ERR_CANT_FIND if the mime type is not present in the mime type table.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1abb03b89f212e6a3fd8bc13e66927ab68"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetMinWorkers
(int count)
  </div>
  <div class="apiDetail">
<p>Set the minimum count of worker threads Set the count of threads the worker pool will have.</p>
This will cause the worker pool to pre-create at least this many threads
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">count</td><td>Minimum count of threads to use.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5432257cb103fefa67fd46e33a0e5917"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetModuleFinalizer
(<a href="#struct_mpr_module" class="ref">MprModule</a> *module, <a href="#mpr_8h_1a98c47ddbb625a457617163f7aeeb0edb" class="ref">MprModuleProc</a> stop)
  </div>
  <div class="apiDetail">
<p>Define a module finalizer that will be called before a module is stopped.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">module</td><td>Module object to modify.</td></tr>
    <tr><td class="param">stop</td><td>Callback function to invoke before stopping the module.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a43d50c6e385a3592778d00c1dc53a8e7"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetModuleSearchPath
(char *searchPath)
  </div>
  <div class="apiDetail">
<p>Set the module search path.</p>
    <dl><dt><b>Description</b>:</dt><dd>Set the directory search path used by the MPR when loading dynamic modules. This path string must should be a colon separated (or semicolon on Windows) set of directories.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">searchPath</td><td>Colon separated set of directories.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a2db0b5b247179376ef476fa5ed05809a"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetModuleTimeout
(<a href="#struct_mpr_module" class="ref">MprModule</a> *module, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout)
  </div>
  <div class="apiDetail">
<p>Set a module timeout.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">module</td><td>Module object to modify.</td></tr>
    <tr><td class="param">timeout</td><td>Inactivity timeout in milliseconds before unloading the module.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aaaecf83d8b07a92579eb8ad5454cdc45"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetOsError
(int error)
  </div>
  <div class="apiDetail">
<p>Set the O/S error code.</p>
    <dl><dt><b>Description</b>:</dt><dd>Set errno or equivalent.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a10d97267fcc49bb5126547b3a520d812"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetPathNewline
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *newline)
  </div>
  <div class="apiDetail">
<p>Set the file system new line character string.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path representing a file in the file system.</td></tr>
    <tr><td class="param">newline</td><td>String containing the newline character(s). &quot;\\n&quot;. Windows uses &quot;\\r\\n&quot;.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a604f5f0da674b354c16dc30be6f058d2"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetPathSeparators
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *separators)
  </div>
  <div class="apiDetail">
<p>Set the file system path separators.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path representing a file in the file system.</td></tr>
    <tr><td class="param">separators</td><td>String containing the directory path separators. Defaults to &quot;/&quot;. Windows uses &quot;/\/&quot;.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a4def6498567ad43a6da505d43bb119fc"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetServerName
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s)
  </div>
  <div class="apiDetail">
<p>Set the application server name string.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">s</td><td>New application server name to use within the application.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ae2baa591f0466c9c64f0cf0147ada904"></a>
<div class="api">
  <div class="prototype">
    int
    mprSetSocketBlockingMode
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> on)
  </div>
  <div class="apiDetail">
<p>Set the socket blocking mode.</p>
    <dl><dt><b>Description</b>:</dt><dd>Set the blocking mode for a socket. By default a socket is in non-blocking mode where read / write calls will not block.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    <tr><td class="param">on</td><td>Set to zero to put the socket into non-blocking mode. Set to non-zero to enable blocking mode.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The old blocking mode if successful or a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1acff97154e7990fa91949ccdfbf34acbe"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetSocketDispatcher
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, <a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher)
  </div>
  <div class="apiDetail">
<p>Set the dispatcher to use for socket events.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    <tr><td class="param">dispatcher</td><td>Dispatcher object reference.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a27866b4c10d6e45ffd96604b221cf314"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetSocketEof
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> eof)
  </div>
  <div class="apiDetail">
<p>Set an EOF condition on the socket.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    <tr><td class="param">eof</td><td>Set to true to set an EOF condition. Set to false to clear it.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a51594bafaa2003511990ffd804189a31"></a>
<div class="api">
  <div class="prototype">
    int
    mprSetSocketNoDelay
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> on)
  </div>
  <div class="apiDetail">
<p>Set the socket delay mode.</p>
    <dl><dt><b>Description</b>:</dt><dd>Set the socket delay behavior (nagle algorithm). By default a socket will partial packet writes a little to try to accumulate data and coalesce TCP/IP packages. Setting the delay mode to false may result in higher performance for interactive applications.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    <tr><td class="param">on</td><td>Set to non-zero to put the socket into no delay mode. Set to zero to enable the nagle algorithm.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The old delay mode if successful or a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac3a517628870edef01c2ee01c076822a"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetSslAlpn
(struct MprSsl *ssl, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *protocols)
  </div>
  <div class="apiDetail">
<p>Set the ALPN protocols for SSL.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a472960cd4ec2360bf05ab678e7cba577"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetSslCaFile
(struct MprSsl *ssl, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *caFile)
  </div>
  <div class="apiDetail">
<p>Set the client certificate file to use for SSL.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ssl</td><td>SSL instance returned from <a class="ref" href="#mpr_8h_1af8c1ae4171f8591e9ca89eb02aeedaa8">mprCreateSsl</a></td></tr>
    <tr><td class="param">caFile</td><td>Path to the SSL client certificate file.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aadf254e5df954326a3f9bcd61e6a106b"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetSslCaPath
(struct MprSsl *ssl, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *caPath)
  </div>
  <div class="apiDetail">
<p>Set the path for the client certificate directory.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is supported for OpenSSL only.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ssl</td><td>SSL instance returned from <a class="ref" href="#mpr_8h_1af8c1ae4171f8591e9ca89eb02aeedaa8">mprCreateSsl</a></td></tr>
    <tr><td class="param">caPath</td><td>Path to the SSL client certificate directory.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Deprecated.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a0eb821dce1b17ce08d83fa63b3ece658"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetSslCertFile
(struct MprSsl *ssl, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *certFile)
  </div>
  <div class="apiDetail">
<p>Set certificate to use for SSL.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ssl</td><td>SSL instance returned from <a class="ref" href="#mpr_8h_1af8c1ae4171f8591e9ca89eb02aeedaa8">mprCreateSsl</a></td></tr>
    <tr><td class="param">certFile</td><td>Path to the SSL certificate file.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af3d90b0a59c1e786421e8f2c2167fa20"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetSslCiphers
(<a href="#struct_mpr_ssl" class="ref">MprSsl</a> *ssl, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ciphers)
  </div>
  <div class="apiDetail">
<p>Set the ciphers to use.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ssl</td><td>SSL instance returned from <a class="ref" href="#mpr_8h_1af8c1ae4171f8591e9ca89eb02aeedaa8">mprCreateSsl</a></td></tr>
    <tr><td class="param">ciphers</td><td>String of suitable ciphers.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a9cda2e070839fbe3188fcd0ceccfdea9"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetSslDevice
(<a href="#struct_mpr_ssl" class="ref">MprSsl</a> *ssl, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *device)
  </div>
  <div class="apiDetail">
<p>Set the SSL Engine to use.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ssl</td><td>SSL instance returned from <a class="ref" href="#mpr_8h_1af8c1ae4171f8591e9ca89eb02aeedaa8">mprCreateSsl</a></td></tr>
    <tr><td class="param">device</td><td>Engine name.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ab6cfe15aa1aa544af99d7fd3279d83ee"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetSslHostname
(<a href="#struct_mpr_ssl" class="ref">MprSsl</a> *ssl, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *hostname)
  </div>
  <div class="apiDetail">
<p>Set the desired hostname for this SSL configuration when using SNI.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ssl</td><td>SSL instance returned from <a class="ref" href="#mpr_8h_1af8c1ae4171f8591e9ca89eb02aeedaa8">mprCreateSsl</a></td></tr>
    <tr><td class="param">hostname</td><td>Name of the host when using SNI.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa8293be1a1b769f03db306834ef5291f"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetSslKeyFile
(struct MprSsl *ssl, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *keyFile)
  </div>
  <div class="apiDetail">
<p>Set the key file to use for SSL.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ssl</td><td>SSL instance returned from <a class="ref" href="#mpr_8h_1af8c1ae4171f8591e9ca89eb02aeedaa8">mprCreateSsl</a></td></tr>
    <tr><td class="param">keyFile</td><td>Path to the SSL key file.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1abcdba4618d5754a0ccfc76ef271776d8"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetSslLogLevel
(struct MprSsl *ssl, int level)
  </div>
  <div class="apiDetail">
<p>Set the SSL log level at which to start tracing SSL events.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ssl</td><td>SSL instance returned from <a class="ref" href="#mpr_8h_1af8c1ae4171f8591e9ca89eb02aeedaa8">mprCreateSsl</a></td></tr>
    <tr><td class="param">level</td><td>Log level (0-9).</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a375d09974e061112fd50d1e705143887"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetSslMatch
(struct MprSsl *ssl, MprMatchSsl match)
  </div>
  <div class="apiDetail">
<p>Set a match callback to select the appropriate SSL configuration to use in response to a client SNI hello.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ssl</td><td>SSL configuration instance.</td></tr>
    <tr><td class="param">match</td><td>MprMatchSsl callback.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a00cd731b20d96a0b0080637d59becd4a"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetSslProtocols
(struct MprSsl *ssl, int protocols)
  </div>
  <div class="apiDetail">
<p>Set the SSL protocol to use.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ssl</td><td>SSL instance returned from <a class="ref" href="#mpr_8h_1af8c1ae4171f8591e9ca89eb02aeedaa8">mprCreateSsl</a></td></tr>
    <tr><td class="param">protocols</td><td>SSL protocols mask.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1abe689d34f52874f6b1ab0d384c95decb"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetSslProvider
(<a href="#struct_mpr_socket_provider" class="ref">MprSocketProvider</a> *provider)
  </div>
  <div class="apiDetail">
<p>Set the SSL provider to use.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">provider</td><td>Socket provider object.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1adc15a963cd6567f7fa05da968bee39a6"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetSslRenegotiate
(<a href="#struct_mpr_ssl" class="ref">MprSsl</a> *ssl, <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> enable)
  </div>
  <div class="apiDetail">
<p>Control SSL session renegotiation.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ssl</td><td>SSL instance returned from <a class="ref" href="#mpr_8h_1af8c1ae4171f8591e9ca89eb02aeedaa8">mprCreateSsl</a></td></tr>
    <tr><td class="param">enable</td><td>Set to true to enable renegotiation (enabled by default).</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a0fe151c86620dc1eec03e0f35082e075"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetSslRevoke
(struct MprSsl *ssl, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *revoke)
  </div>
  <div class="apiDetail">
<p>Define a list of certificates to revoke.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ssl</td><td>SSL instance returned from <a class="ref" href="#mpr_8h_1af8c1ae4171f8591e9ca89eb02aeedaa8">mprCreateSsl</a></td></tr>
    <tr><td class="param">revoke</td><td>Path to the SSL certificate revocation list.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a16313273a92421655778343d310475ee"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetSslTicket
(<a href="#struct_mpr_ssl" class="ref">MprSsl</a> *ssl, <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> enable)
  </div>
  <div class="apiDetail">
<p>Enable SSL session tickets.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ssl</td><td>SSL instance returned from <a class="ref" href="#mpr_8h_1af8c1ae4171f8591e9ca89eb02aeedaa8">mprCreateSsl</a></td></tr>
    <tr><td class="param">enable</td><td>Set to true to enable.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a57f5e86ffcf2cabdb1c778131ac84b7e"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprSetThreadYield
(<a href="#struct_mpr_thread" class="ref">MprThread</a> *tp, <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> on)
  </div>
  <div class="apiDetail">
<p>Set whether a thread can yield for GC.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">tp</td><td>Thread object returned by <a class="ref" href="#mpr_8h_1afad5f424b850bf2aa9f995f6c0a62fc1">mprCreateThread</a>. Set to NULL for the current thread.</td></tr>
    <tr><td class="param">on</td><td>Set to true to enable yielding.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ad7721cca919f57f9b85434e6435ef092"></a>
<div class="api">
  <div class="prototype">
    void
    mprSetWorkerStackSize
(int size)
  </div>
  <div class="apiDetail">
<p>Set the default worker stack size.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">size</td><td>Stack size in bytes.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac79cdd0486a5ee8a6db3e93096f15ee9"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprShouldAbortRequests
(void )
  </div>
  <div class="apiDetail">
<p>Test if requests should be aborted.</p>
    <dl><dt><b>Description</b>:</dt><dd>This routine indicates that current requests should be terminated due to an application shutdown. This will be true then the MPR-&gt;state &gt;= MPR_EXIT_STOPPED. See also <a class="ref" href="#mpr_8h_1a8b6c8348517bf8cb56468cb8106d7147">mprShouldDenyNewRequests</a></dd></dl>
    <dl><dt>Returns:</dt><dd>True if new requests should be denied.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a8b6c8348517bf8cb56468cb8106d7147"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprShouldDenyNewRequests
(void )
  </div>
  <div class="apiDetail">
<p>Test if new requests should be denied.</p>
    <dl><dt><b>Description</b>:</dt><dd>This routine indicates if an application shutdown has been initiated and services should not accept new requests or connections. This will be true then the MPR-&gt;state &gt;= MPR_EXIT_STOPPING. See also <a class="ref" href="#mpr_8h_1ac79cdd0486a5ee8a6db3e93096f15ee9">mprShouldAbortRequests</a></dd></dl>
    <dl><dt>Returns:</dt><dd>True if new requests should be denied.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a2836549ee05ea1901a64a26e51f8ed86"></a>
<div class="api">
  <div class="prototype">
    void
    mprShutdown
(int exitStrategy, int status, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout)
  </div>
  <div class="apiDetail">
<p>Initiate shutdown of the MPR and application.</p>
    <dl><dt><b>Description</b>:</dt><dd>Commence shutdown of the application according to the shutdown policy defined by the &quot;exitStrategy&quot; parameter. An application may call this routine from any thread to request the application exit. Depending on the exitStrategy, this may be an abortive or graceful exit. A desired application exit status code can defined to indicate the cause of the shutdown. <br/><br/>
 Once called, this routine will set the MPR execution state to MPR_EXIT_STOPPING. Services should detect this by calling <a class="ref" href="#mpr_8h_1a8b6c8348517bf8cb56468cb8106d7147">mprShouldDenyNewRequests</a> before accepting new connections or requests, but otherwise, services should not take any destructive actions until the MPR state is advanced to MPR_EXIT_STOPPED by <a class="ref" href="#mpr_8h_1a4f36e049582f33f7384fd5648db77a2a">mprDestroy</a>. This state can be detected by calling <a class="ref" href="#mpr_8h_1ac79cdd0486a5ee8a6db3e93096f15ee9">mprShouldAbortRequests</a>. Users can invoke <a class="ref" href="#mpr_8h_1a757ee20c010c60a42e916537b7a89453">mprCancelShutdown</a> to resume normal operations provided <a class="ref" href="#mpr_8h_1a4f36e049582f33f7384fd5648db77a2a">mprDestroy</a> has not proceeded past the point of no return when destructive termination actions are commenced. <br/><br/>
 Applications that have a user events thread and call <a class="ref" href="#mpr_8h_1a205adaee3b45d0cc899afc89eb9f3b3d">mprServiceEvents</a> from their main program, will typically invoke mprShutdown from some other MPR thread to initiate the shutdown. When running requests have completed, or when the shutdown timeout expires (MPR-&gt;exitTimeout), the call to <a class="ref" href="#mpr_8h_1a205adaee3b45d0cc899afc89eb9f3b3d">mprServiceEvents</a> in the main program will return and the application can then call <a class="ref" href="#mpr_8h_1a4f36e049582f33f7384fd5648db77a2a">mprDestroy</a> to complete the shutdown. <br/><br/>
 Note: This routine starts the shutdown process but does not perform any destructive actions.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">exitStrategy</td><td>Shutdown policy. If the MPR_EXIT_ABORT flag is specified, the application will immediately call exit() and will terminate without waiting for current requests to complete. This is not recommended for normal operation as data may be lost. <br/><br/>
 If MPR_EXIT_SAFE is defined, the shutdown will be cancelled if all requests do not complete before the exit timeout defined via <a class="ref" href="#mpr_8h_1a278ee775a1c2e956d09a4683e778caea">mprSetExitTimeout</a> expires. <br/><br/>
 Define the MPR_EXIT_RESTART flag for the application to automatically restart after exiting. Do not use this option if the application is using a watchdog/angel process to automatically restart the application (such as appman by appweb).</td></tr>
    <tr><td class="param">status</td><td>Proposed exit status to use when the application exits. See <a class="ref" href="#mpr_8h_1a6dcbec55f8e4ba71d582bf0308ee7acd">mprGetExitStatus</a></td></tr>
    <tr><td class="param">timeout</td><td>Exit timeout in milliseconds to wait for current requests to complete. If set to -1, for the default exit timeout.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ab014329886bcb9a8cb9b970afc30378b"></a>
<div class="api">
  <div class="prototype">
    void
    mprSignalCond
(<a href="#struct_mpr_cond" class="ref">MprCond</a> *cond)
  </div>
  <div class="apiDetail">
<p>Signal a condition lock variable.</p>
    <dl><dt><b>Description</b>:</dt><dd>Signal a condition variable and set it to the triggered status. Existing or future caller of <a class="ref" href="#mpr_8h_1a2902c6005212638d289e867d567e16d7">mprWaitForCond</a> will be awakened. The condition variable will be automatically reset when the waiter awakes. Should only be used for single waiters. Use mprSignalMultiCond for use with multiple waiters. <br/><br/>
 This API (like nearly all MPR APIs) must only be used by MPR threads and not by non-MPR (foreign) threads. If you need to synchronize active of MPR threads with non-MPR threads, use <a class="ref" href="#mpr_8h_1abdf25e12b2bcc5c116599b639cc18d5c">mprCreateEvent</a> which can be called from foreign threads.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cond</td><td>Condition variable object created via <a class="ref" href="#mpr_8h_1a563cf7257bd5ed5d1024cd457bae598f">mprCreateCond</a></td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac81ecb3239317f36c36c7d849d738540"></a>
<div class="api">
  <div class="prototype">
    void
    mprSignalDispatcher
(<a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher)
  </div>
  <div class="apiDetail">
<p>Signal the dispatcher to wakeup and re-examine its queues.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">dispatcher</td><td>Event dispatcher to monitor.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a9b20d1bf69e28579dd968c1c0daf976b"></a>
<div class="api">
  <div class="prototype">
    void
    mprSignalMultiCond
(<a href="#struct_mpr_cond" class="ref">MprCond</a> *cond)
  </div>
  <div class="apiDetail">
<p>Signal a condition lock variable for use with multiple waiters.</p>
    <dl><dt><b>Description</b>:</dt><dd>Signal a condition variable and set it to the triggered status. Existing or future callers of <a class="ref" href="#mpr_8h_1a2902c6005212638d289e867d567e16d7">mprWaitForCond</a> will be awakened. The conditional variable will not be automatically reset and must be reset manually via mprResetCond.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cond</td><td>Condition variable object created via <a class="ref" href="#mpr_8h_1a563cf7257bd5ed5d1024cd457bae598f">mprCreateCond</a></td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a85c39ea54c27d4b13825ba78c2e7adda"></a>
<div class="api">
  <div class="prototype">
    void
    mprSleep
(<a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> msec)
  </div>
  <div class="apiDetail">
<p>Sleep for a while.</p>
    <dl><dt><b>Description</b>:</dt><dd>This routine blocks for the given time and yields for GC during that time. Ensure all memory is held before the sleep.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">msec</td><td>Number of milliseconds to sleep.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a1a937447e0d16a18c8c4fd61df568d59"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprSocketHandshaking
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)
  </div>
  <div class="apiDetail">
<p>Test if the socket is doing an SSL handshake.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the SSL stack is handshaking.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a8bd161da457c7cdc6eb4437d714534f6"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprSocketHasBuffered
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)
  </div>
  <div class="apiDetail">
<p>Test if the socket has buffered data.</p>
    <dl><dt><b>Description</b>:</dt><dd>Use this function to avoid waiting for incoming I/O if data is already buffered.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the socket has pending data to read or write.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a3083d9605d116fa97f48d7941da8648e"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprSocketHasBufferedRead
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)
  </div>
  <div class="apiDetail">
<p>Test if the socket has buffered read data.</p>
    <dl><dt><b>Description</b>:</dt><dd>Use this function to avoid waiting for incoming I/O if data is already buffered.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the socket has pending read data.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a23bc7f651617f75a71ba39686db02f47"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprSocketHasBufferedWrite
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)
  </div>
  <div class="apiDetail">
<p>Test if the socket has buffered write data.</p>
    <dl><dt><b>Description</b>:</dt><dd>Use this function to detect that there is buffer data to write in a SSL stack.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the socket has pending write data.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a11805cd151f7b445d25457e7262d4117"></a>
<div class="api">
  <div class="prototype">
    void *
    mprSort
(void *base, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> num, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> width, <a href="#mpr_8h_1a69516d3096bf8d921a5348af8ce7ebde" class="ref">MprSortProc</a> compare, void *ctx)
  </div>
  <div class="apiDetail">
<p>Quicksort.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is a quicksort with a context argument.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">base</td><td>Base of array to sort.</td></tr>
    <tr><td class="param">num</td><td>Number of array elements.</td></tr>
    <tr><td class="param">width</td><td>Width of array elements.</td></tr>
    <tr><td class="param">compare</td><td>Comparison function.</td></tr>
    <tr><td class="param">ctx</td><td>Context argument to provide to comparison function.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The base array for chaining.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a66e67b9938519486e9cb190582731999"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_list" class="ref">MprList</a> *
    mprSortList
(<a href="#struct_mpr_list" class="ref">MprList</a> *list, <a href="#mpr_8h_1a69516d3096bf8d921a5348af8ce7ebde" class="ref">MprSortProc</a> compare, void *ctx)
  </div>
  <div class="apiDetail">
<p>Sort a list.</p>
    <dl><dt><b>Description</b>:</dt><dd>Sort a list using the sort ordering dictated by the supplied compare function.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">list</td><td>List pointer returned from mprCreateList.</td></tr>
    <tr><td class="param">compare</td><td>Comparison function. If null, then a default string comparison is used.</td></tr>
    <tr><td class="param">ctx</td><td>Context to provide to comparison function.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The sorted list.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af2a84bc9cee343c8ebfc3bfa49751795"></a>
<div class="api">
  <div class="prototype">
    void
    mprSpinLock
(<a href="#struct_mpr_spin" class="ref">MprSpin</a> *lock)
  </div>
  <div class="apiDetail">
<p>Lock a spinlock.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call asserts a lock on the given spinlock so that other threads calling mprSpinLock will block until the curren thread calls mprSpinUnlock.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aeb11c8a1f0c2c3f905967a932626121e"></a>
<div class="api">
  <div class="prototype">
    void
    mprSpinUnlock
(<a href="#struct_mpr_spin" class="ref">MprSpin</a> *lock)
  </div>
  <div class="apiDetail">
<p>Unlock a spinlock.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call unlocks a spinlock previously locked via mprSpinLock or mprTrySpinLock.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ad2a85131eb557b8beeedb22d851f6dc7"></a>
<div class="api">
  <div class="prototype">
    int
    mprSslInit
(void *unused, <a href="#struct_mpr_module" class="ref">MprModule</a> *module)
  </div>
  <div class="apiDetail">
<p>Initialize the SSL provider.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a57dfaf371ac0d16f5a09dc6595316692"></a>
<div class="api">
  <div class="prototype">
    int
    mprStart
(void )
  </div>
  <div class="apiDetail">
<p>Start the <a class="ref" href="#struct_mpr">Mpr</a> services.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a120e7a3a3a571b9520853e31d9ce6021"></a>
<div class="api">
  <div class="prototype">
    int
    mprStartCmd
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, int argc, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> **argv, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> **envp, int flags)
  </div>
  <div class="apiDetail">
<p>Start the command.</p>
This starts the command but does not wait for its completion. Once started, mprWriteCmd can be used to write to the command and response data can be received via mprReadCmd
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    <tr><td class="param">argc</td><td>Count of arguments in argv.</td></tr>
    <tr><td class="param">argv</td><td>Command arguments array.</td></tr>
    <tr><td class="param">envp</td><td>Array of environment strings. Each environment string should be of the form: &quot;KEY=VALUE&quot;. The array must be null terminated.</td></tr>
    <tr><td class="param">flags</td><td>Flags to modify execution. Valid flags are: MPR_CMD_NEW_SESSION Create a new session on Unix MPR_CMD_SHOW Show the commands window on Windows MPR_CMD_IN Connect to stdin.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful. Otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a05910285cefa99428bada1572eed1bbd"></a>
<div class="api">
  <div class="prototype">
    int
    mprStartDispatcher
(<a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher)
  </div>
  <div class="apiDetail">
<p>Start a dispatcher by setting it on the run queue.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is used to ensure that all event activity will only happen on the thread that calls mprStartDispatcher.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">dispatcher</td><td>Dispatcher object created via <a class="ref" href="#mpr_8h_1a1da72b3760024ca15d93ade76de8e33a">mprCreateDispatcher</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative MPR status code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1add5858bb2b86157b6d37aef892696241"></a>
<div class="api">
  <div class="prototype">
    int
    mprStartEventsThread
(void )
  </div>
  <div class="apiDetail">
<p>Start an thread dedicated to servicing events.</p>
This will create a new thread and invoke mprServiceEvents
    <dl><dt>Returns:</dt><dd>Zero if successful.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a8497fae7134238ba1b5f22680b1fd344"></a>
<div class="api">
  <div class="prototype">
    int
    mprStartLogging
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *logSpec, int flags)
  </div>
  <div class="apiDetail">
<p>Start logging.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">logSpec</td><td>Set the log file name and level. The format is &quot;pathName[:level]&quot;. The level is a verbosity level from 0 to 5 with 5 being the most verbose. The following levels are generally observed: <ul><li>0 - Essential messages: errors and warnings </li><li>1 - Non-essential warnings </li><li>2 - Configuration information </li><li>3 - Useful informational messages </li><li>4 - Debug information </li><li>5 - Most verbose levels of messages useful for debugging </li></ul>
If logSpec is set to null, then logging is not started. The filename may be set to &quot;stdout&quot;, &quot;stderr&quot; or &quot;none&quot;. The latter is the same as supplying null as the logSpec.</td></tr>
    <tr><td class="param">flags</td><td>Set to MPR_LOG_CONFIG to show the configuration in the log file. Set to MPR_LOG_CMDLINE if a command line override has been used to initiate logging. Set MPR_LOG_DETAILED to use the detailed message format. Set MPR_LOG_ANEW to truncate existing log files after backup.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative <a class="ref" href="#struct_mpr">Mpr</a> error code. See the log for diagnostics.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ada93a8c2366fe16efc767791d81793bd"></a>
<div class="api">
  <div class="prototype">
    int
    mprStartModule
(<a href="#struct_mpr_module" class="ref">MprModule</a> *mp)
  </div>
  <div class="apiDetail">
<p>Start a module.</p>
    <dl><dt><b>Description</b>:</dt><dd>Invoke the module start entry point. The start routine is only called once.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">mp</td><td>Module object returned via <a class="ref" href="#mpr_8h_1a13659357368fa3c581b398d25af75bb4">mprLookupModule</a></td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a1e4dcdd954efac9c65c5c462c24967be"></a>
<div class="api">
  <div class="prototype">
    int
    mprStartModuleService
(void )
  </div>
  <div class="apiDetail">
<p>Start the module service.</p>
    <dl><dt><b>Description</b>:</dt><dd>This calls the start entry point for all registered modules.</dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aea150df805ae67bea5f09b095544f14c"></a>
<div class="api">
  <div class="prototype">
    int
    mprStartOsService
(void )
  </div>
  <div class="apiDetail">
<p>Start the O/S dependent subsystem.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a3026fd2597352a226c67dcd2f847ed08"></a>
<div class="api">
  <div class="prototype">
    int
    mprStartOsThread
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, void *proc, void *data, <a href="#struct_mpr_thread" class="ref">MprThread</a> *tp)
  </div>
  <div class="apiDetail">
<p>Start an O/S thread.</p>
    <dl><dt><b>Description</b>:</dt><dd>Start an O/S thread.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">name</td><td>Task name to use on VxWorks.</td></tr>
    <tr><td class="param">proc</td><td>Callback function for the thread&apos;s main.</td></tr>
    <tr><td class="param">data</td><td>Data for the callback to receive.</td></tr>
    <tr><td class="param">tp</td><td>Optional <a class="ref" href="#struct_mpr_thread">MprThread</a> object to receive thread handles.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns zero if successful, otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a35c53df918c2f52e2e1f6961e35ee8d1"></a>
<div class="api">
  <div class="prototype">
    int
    mprStartThread
(<a href="#struct_mpr_thread" class="ref">MprThread</a> *thread)
  </div>
  <div class="apiDetail">
<p>Start a thread.</p>
    <dl><dt><b>Description</b>:</dt><dd>Start a thread previously created via <a class="ref" href="#mpr_8h_1afad5f424b850bf2aa9f995f6c0a62fc1">mprCreateThread</a>. The thread will begin at the entry function defined in <a class="ref" href="#mpr_8h_1afad5f424b850bf2aa9f995f6c0a62fc1">mprCreateThread</a></dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">thread</td><td>Thread object returned from <a class="ref" href="#mpr_8h_1afad5f424b850bf2aa9f995f6c0a62fc1">mprCreateThread</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns zero if successful, otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aff85a5fec251ea6ce4c9f24532b93e11"></a>
<div class="api">
  <div class="prototype">
    int
    mprStartWorker
(<a href="#mpr_8h_1a6c2bc16deb84f2893c1935deb94bec29" class="ref">MprWorkerProc</a> proc, void *data)
  </div>
  <div class="apiDetail">
<p>Start a worker thread.</p>
    <dl><dt><b>Description</b>:</dt><dd>Start a worker thread executing the given worker procedure callback.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">proc</td><td>Worker procedure callback.</td></tr>
    <tr><td class="param">data</td><td>Data parameter to the callback.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a46693977a785a59037ff73375bd2acb2"></a>
<div class="api">
  <div class="prototype">
    <a href="#mpr_8h_1af9381320a2640ea84038579d8f143c01" class="ref">Socket</a>
    mprStealSocketHandle
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp)
  </div>
  <div class="apiDetail">
<p>Steal the socket handle.</p>
    <dl><dt><b>Description</b>:</dt><dd>Return the socket handle and set the <a class="ref" href="#struct_mpr_socket">MprSocket</a> handle to the invalid socket. This enables callers to use the O/S socket handle for their own purposes.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a6a027763dead49cc62961a6e6b17c501"></a>
<div class="api">
  <div class="prototype">
    int
    mprStopCmd
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, int signal)
  </div>
  <div class="apiDetail">
<p>Stop the command.</p>
The command is immediately killed
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    <tr><td class="param">signal</td><td>Signal to send to the command to kill if required.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a1f2c85a20242ec0c1e4830ccd25c7bb7"></a>
<div class="api">
  <div class="prototype">
    void
    mprStopContinuousEvent
(<a href="#struct_mpr_event" class="ref">MprEvent</a> *event)
  </div>
  <div class="apiDetail">
<p>Stop an event.</p>
    <dl><dt><b>Description</b>:</dt><dd>Stop a continuous event and remove from the queue.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">event</td><td>Event object returned from <a class="ref" href="#mpr_8h_1abdf25e12b2bcc5c116599b639cc18d5c">mprCreateEvent</a></td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a046940fc239f1be73583fd76b312116a"></a>
<div class="api">
  <div class="prototype">
    int
    mprStopDispatcher
(<a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher)
  </div>
  <div class="apiDetail">
<p>Stop a dispatcher by removing it from the run queue.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">dispatcher</td><td>Dispatcher object created via <a class="ref" href="#mpr_8h_1a1da72b3760024ca15d93ade76de8e33a">mprCreateDispatcher</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative MPR status code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa07f1efa0d8eb9f8cfe00749a2a8518f"></a>
<div class="api">
  <div class="prototype">
    int
    mprStopModule
(<a href="#struct_mpr_module" class="ref">MprModule</a> *mp)
  </div>
  <div class="apiDetail">
<p>Stop a module.</p>
    <dl><dt><b>Description</b>:</dt><dd>Invoke the module stop entry point. The stop routine is only called once.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">mp</td><td>Module object returned via <a class="ref" href="#mpr_8h_1a13659357368fa3c581b398d25af75bb4">mprLookupModule</a></td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a6284c58e5740cea74f8c072d53d2cd8d"></a>
<div class="api">
  <div class="prototype">
    void
    mprStopModuleService
(void )
  </div>
  <div class="apiDetail">
<p>Stop the module service.</p>
    <dl><dt><b>Description</b>:</dt><dd>This calls the stop entry point for all registered modules.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a1fa973743b8b7ab3132f6326d47e2caf"></a>
<div class="api">
  <div class="prototype">
    void
    mprStopOsService
(void )
  </div>
  <div class="apiDetail">
<p>Stop the O/S dependent subsystem.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a6468e63efbe2e8cdfbb147575641e058"></a>
<div class="api">
  <div class="prototype">
    void
    mprSuspendThread
(<a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout)
  </div>
  <div class="apiDetail">
<p>Suspend the current thread.</p>
    <dl><dt><b>Description</b>:</dt><dd>Suspend the current thread until the application is shutting down.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">timeout</td><td>Timeout to wait for shutdown.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5d538da0c5cff7c4496331fe377fec65"></a>
<div class="api">
  <div class="prototype">
    char *
    mprTransformPath
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, int flags)
  </div>
  <div class="apiDetail">
<p>Transform a path.</p>
    <dl><dt><b>Description</b>:</dt><dd>A path is transformed by cleaning and then transforming according to the flags.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>First path to compare.</td></tr>
    <tr><td class="param">flags</td><td>Flags to modify the path representation.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A newly allocated, clean path.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a8dee28617aab5fcfc94faf44a9e561c7"></a>
<div class="api">
  <div class="prototype">
    char *
    mprTrimPathComponents
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, int count)
  </div>
  <div class="apiDetail">
<p>Trim path components from a path.</p>
    <dl><dt><b>Description</b>:</dt><dd>Trim the requested number of path components from the front or end of a path.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path to examine.</td></tr>
    <tr><td class="param">count</td><td>Number of components to trim. If negative, trim from the end.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated string with the trimmed path.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a8d997404544c961232bdd255ac8122b2"></a>
<div class="api">
  <div class="prototype">
    char *
    mprTrimPathDrive
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Trim the drive from a path.</p>
    <dl><dt><b>Description</b>:</dt><dd>Trim a drive specifier (&quot;c:&quot;) from the start of a path.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path to examine.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated string with the trimmed drive.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1acc54c392eac933777fd6871d6e26a195"></a>
<div class="api">
  <div class="prototype">
    char *
    mprTrimPathExt
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Trim an extension from a path.</p>
    <dl><dt><b>Description</b>:</dt><dd>Trim a file extension (&quot;.ext&quot;) from a path name.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Path to examine.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated string with the trimmed path.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a61cd5b0e215e4dafa26f90839cc9429e"></a>
<div class="api">
  <div class="prototype">
    int
    mprTruncateFile
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="#mpr_8h_1a87e9f435008723c7b1489af1944c6e20" class="ref">MprOff</a> size)
  </div>
  <div class="apiDetail">
<p>Truncate a file.</p>
    <dl><dt><b>Description</b>:</dt><dd>Truncate a file to a given size. Note this works on a path and not on an open file.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>File to truncate.</td></tr>
    <tr><td class="param">size</td><td>New maximum size for the file.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a2b3b8e824b92499192ea48512e31c26d"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprTryLock
(<a href="#struct_mpr_mutex" class="ref">MprMutex</a> *lock)
  </div>
  <div class="apiDetail">
<p>Attempt to lock access.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call attempts to assert a lock on the given lock mutex so that other threads calling mprLock or mprTryLock will block until the current thread calls mprUnlock.</dd></dl>
    <dl><dt>Returns:</dt><dd>Returns zero if the successful in locking the mutex. Returns a negative MPR error code if unsuccessful.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac257b932fcc7140852e6830640d2301b"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    mprTrySpinLock
(<a href="#struct_mpr_spin" class="ref">MprSpin</a> *lock)
  </div>
  <div class="apiDetail">
<p>Attempt to lock access on a spin lock.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call attempts to assert a lock on the given spin lock so that other threads calling mprSpinLock or mprTrySpinLock will block until the current thread calls mprSpinUnlock.</dd></dl>
    <dl><dt>Returns:</dt><dd>Returns zero if the successful in locking the spinlock. Returns a negative MPR error code if unsuccessful.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a4174cbe5ab086ed09c6669969683bba9"></a>
<div class="api">
  <div class="prototype">
    int
    mprUnloadModule
(<a href="#struct_mpr_module" class="ref">MprModule</a> *mp)
  </div>
  <div class="apiDetail">
<p>Unload a module.</p>
    <dl><dt><b>Description</b>:</dt><dd>Unload a module from the MPR. This will unload a dynamic shared object (shared library). This routine is not fully supported by the MPR and is often fraught with issues. A module must usually be completely inactive with no allocated memory when it is unloaded. USE WITH CARE.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">mp</td><td>Module object returned via <a class="ref" href="#mpr_8h_1a13659357368fa3c581b398d25af75bb4">mprLookupModule</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if the module can be unloaded. Otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Internal.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1adb54bcae3a174efcde1c0ea3c6f8a565"></a>
<div class="api">
  <div class="prototype">
    int
    mprUnloadNativeModule
(<a href="#struct_mpr_module" class="ref">MprModule</a> *mp)
  </div>
  <div class="apiDetail">
<p>Unload a native module.</p>
    <dl><dt><b>Description</b>:</dt><dd>WARNING: modules must be designed to be unloaded and must be quiesced before unloading.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">mp</td><td>Module object created via <a class="ref" href="#mpr_8h_1a35f4f35014f5601bb37ba7bbfcac62be">mprCreateModule</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a40a516fe58b4b2998852cd0c853027ad"></a>
<div class="api">
  <div class="prototype">
    void
    mprUnlock
(<a href="#struct_mpr_mutex" class="ref">MprMutex</a> *lock)
  </div>
  <div class="apiDetail">
<p>Unlock a mutex.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call unlocks a mutex previously locked via mprLock or mprTryLock.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a12b7f81e6e807d025f0de76f27d9f54e"></a>
<div class="api">
  <div class="prototype">
    int
    mprUpgradeSocket
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, struct MprSsl *ssl, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *peerName)
  </div>
  <div class="apiDetail">
<p>Upgrade a socket to use SSL/TLS.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket to upgrade.</td></tr>
    <tr><td class="param">ssl</td><td>SSL configurations to use. Set to NULL to use the default.</td></tr>
    <tr><td class="param">peerName</td><td>Required peer name in handshake with peer. Used by clients to verify the server hostname.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af03b7222f372da3367027b0f92f3e83f"></a>
<div class="api">
  <div class="prototype">
    char *
    mprUriDecode
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *uri)
  </div>
  <div class="apiDetail">
<p>Decode a URI string by de-scaping URI characters.</p>
    <dl><dt><b>Description</b>:</dt><dd>Decode a string with www-encoded characters that have meaning for URIs.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">uri</td><td>URI to decode.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A reference to the buf argument.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a48f524ad7c7269fe2ad8d7c3d6b18e04"></a>
<div class="api">
  <div class="prototype">
    char *
    mprUriDecodeInSitu
(char *uri)
  </div>
  <div class="apiDetail">
<p>Decode a URI string by de-scaping URI characters.</p>
    <dl><dt><b>Description</b>:</dt><dd>Decode a string with www-encoded characters that have meaning for URIs. This routines operates in-situ and modifies the buffer.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">uri</td><td>URI to decode.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A reference to the buf argument.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a075b8404f829cbbd86365ba837445ad9"></a>
<div class="api">
  <div class="prototype">
    char *
    mprUriEncode
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *uri, int map)
  </div>
  <div class="apiDetail">
<p>Encode a string by escaping URI characters.</p>
    <dl><dt><b>Description</b>:</dt><dd>Encode a string escaping all characters that have meaning for URIs.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">uri</td><td>URI to encode.</td></tr>
    <tr><td class="param">map</td><td>Map to encode characters. Select from MPR_ENCODE_URI or MPR_ENCODE_URI_COMPONENT.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated string containing the encoded URI.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a55085e339b37476746b29118be44cca3"></a>
<div class="api">
  <div class="prototype">
    void int
    mprUsingDefaultLogHandler
(void )
  </div>
  <div class="apiDetail">
<p>Determine if the app is using the default MPR log handler.</p>
    <dl><dt><b>Description</b>:</dt><dd>Returns true if no custom log handler has been installed.</dd></dl>
    <dl><dt>Returns:</dt><dd>True if using the default log handler.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a541aec6f41d797ea79ca2df68836bc8b"></a>
<div class="api">
  <div class="prototype">
    void
    mprVerifySslDepth
(struct MprSsl *ssl, int depth)
  </div>
  <div class="apiDetail">
<p>Control the depth of SSL SSL certificate verification.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ssl</td><td>SSL instance returned from <a class="ref" href="#mpr_8h_1af8c1ae4171f8591e9ca89eb02aeedaa8">mprCreateSsl</a></td></tr>
    <tr><td class="param">depth</td><td>Set to the number of intermediate certificates to verify. Defaults to 1.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa94da504a06310268bed77f129201803"></a>
<div class="api">
  <div class="prototype">
    void
    mprVerifySslIssuer
(struct MprSsl *ssl, <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> on)
  </div>
  <div class="apiDetail">
<p>Control the verification of SSL certificate issuers.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ssl</td><td>SSL instance returned from <a class="ref" href="#mpr_8h_1af8c1ae4171f8591e9ca89eb02aeedaa8">mprCreateSsl</a></td></tr>
    <tr><td class="param">on</td><td>Set to true to enable SSL certificate issuer verification.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a03d58e43481126fde6095e65130918cc"></a>
<div class="api">
  <div class="prototype">
    void
    mprVerifySslPeer
(struct MprSsl *ssl, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *mode)
  </div>
  <div class="apiDetail">
<p>Require verification of peer certificates.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ssl</td><td>SSL instance returned from <a class="ref" href="#mpr_8h_1af8c1ae4171f8591e9ca89eb02aeedaa8">mprCreateSsl</a></td></tr>
    <tr><td class="param">mode</td><td>Set to none, optional or required.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a312cc2081a581e190c6f8d0107727aa0"></a>
<div class="api">
  <div class="prototype">
    void *
    mprVirtAlloc
(<a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a> size, int mode)
  </div>
  <div class="apiDetail">
<p>Memory virtual memory into the applications address space.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">size</td><td>of virtual memory to map. This size will be rounded up to the nearest page boundary.</td></tr>
    <tr><td class="param">mode</td><td>Mask set to MPR_MAP_READ | MPR_MAP_WRITE.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a6d3bd582a0bdcafa69428aa29c0279c8"></a>
<div class="api">
  <div class="prototype">
    void
    mprVirtFree
(void *ptr, <a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a> size)
  </div>
  <div class="apiDetail">
<p>Free (unpin) a mapped section of virtual memory.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ptr</td><td>Virtual address to free. Should be page aligned.</td></tr>
    <tr><td class="param">size</td><td>Size of memory to free in bytes.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a1e3fc2a672d14270f5a15f08b9a99409"></a>
<div class="api">
  <div class="prototype">
    int
    mprWaitForCmd
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout)
  </div>
  <div class="apiDetail">
<p>Wait for the command to complete.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    <tr><td class="param">timeout</td><td>Time in milliseconds to wait for the command to complete and exit.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful. Otherwise a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a2902c6005212638d289e867d567e16d7"></a>
<div class="api">
  <div class="prototype">
    int
    mprWaitForCond
(<a href="#struct_mpr_cond" class="ref">MprCond</a> *cond, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout)
  </div>
  <div class="apiDetail">
<p>Wait for a condition lock variable.</p>
    <dl><dt><b>Description</b>:</dt><dd>Wait for a condition lock variable to be signaled. If the condition is signaled before the timeout expires, this call will reset the condition variable and return. This way, it automatically resets the variable for future waiters.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cond</td><td>Condition variable object created via <a class="ref" href="#mpr_8h_1a563cf7257bd5ed5d1024cd457bae598f">mprCreateCond</a></td></tr>
    <tr><td class="param">timeout</td><td>Time in milliseconds to wait for the condition variable to be signaled.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if the event was signalled. Returns &lt; 0 for a timeout.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa523c291209f9419ad27f8b7be4e231d"></a>
<div class="api">
  <div class="prototype">
    int
    mprWaitForEvent
(<a href="#struct_mpr_dispatcher" class="ref">MprDispatcher</a> *dispatcher, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout, <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> mark)
  </div>
  <div class="apiDetail">
<p>Wait for an event to occur on the given dispatcher.</p>
    <dl><dt><b>Description</b>:</dt><dd>Use this routine to wait for an event and service the event on the given dispatcher. This routine should only be called in blocking code. <br/><br/>
This routine yields to the garbage collector by calling <a class="ref" href="#mpr_8h_1af140a2fda18b2e8461236cc44c0a2cc4">mprYield</a>. Callers must retain all required memory. <br/><br/>
Note that an event may occur before or while invoking this API. To address this window of time, you should call <a class="ref" href="#mpr_8h_1a85ab494f065b00d321a75512ebdc1219">mprGetEventMark</a> to get a Dispatcher event mark and then test your application state to determine if waiting is required. If so, then pass the mark to mprWaitForEvent so it can detect if any events have been processed since calling mprGetEventMark.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">dispatcher</td><td>Event dispatcher to monitor.</td></tr>
    <tr><td class="param">timeout</td><td>for waiting in milliseconds.</td></tr>
    <tr><td class="param">mark</td><td>Dispatcher mark returned from <a class="ref" href="#mpr_8h_1a85ab494f065b00d321a75512ebdc1219">mprGetEventMark</a></td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful and an event occurred before the timeout expired. Returns <a class="ref" href="#mpr_8h_1a5a93a590163db7efac72b4cdf1167028">MPR_ERR_TIMEOUT</a> if no event is fired before the timeout expires.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a050cd9b37c257aca0790ce48bc760f0b"></a>
<div class="api">
  <div class="prototype">
    void
    mprWaitForIO
(<a href="#struct_mpr_wait_service" class="ref">MprWaitService</a> *ws, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout)
  </div>
  <div class="apiDetail">
<p>Wait for I/O.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call waits for any I/O events on wait handlers until the given timeout expires. This routine yields to the garbage collector by calling <a class="ref" href="#mpr_8h_1af140a2fda18b2e8461236cc44c0a2cc4">mprYield</a>. Callers must retain all required memory.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ws</td><td>Wait service object.</td></tr>
    <tr><td class="param">timeout</td><td>Timeout in milliseconds to wait for an event.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a0b4bca5c7c7922fddc14e08213892289"></a>
<div class="api">
  <div class="prototype">
    int
    mprWaitForMultiCond
(<a href="#struct_mpr_cond" class="ref">MprCond</a> *cond, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout)
  </div>
  <div class="apiDetail">
<p>Wait for a condition lock variable for use with multiple waiters.</p>
    <dl><dt><b>Description</b>:</dt><dd>Wait for a condition lock variable to be signaled. Multiple waiters are supported and the condition variable must be manually reset via mprResetCond. The condition may signaled before calling mprWaitForMultiCond.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cond</td><td>Condition variable object created via <a class="ref" href="#mpr_8h_1a563cf7257bd5ed5d1024cd457bae598f">mprCreateCond</a></td></tr>
    <tr><td class="param">timeout</td><td>Time in milliseconds to wait for the condition variable to be signaled.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if the event was signalled. Returns &lt; 0 for a timeout.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a0a93f3ae8149bd4904921ffb36e493c6"></a>
<div class="api">
  <div class="prototype">
    int
    mprWaitForSingleIO
(int fd, int mask, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> timeout)
  </div>
  <div class="apiDetail">
<p>Wait for I/O on a file descriptor.</p>
No processing of the I/O event is done
    <dl><dt><b>Description</b>:</dt><dd>This routine yields to the garbage collector by calling <a class="ref" href="#mpr_8h_1af140a2fda18b2e8461236cc44c0a2cc4">mprYield</a>. Callers must retain all required memory.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">fd</td><td>File descriptor to examine.</td></tr>
    <tr><td class="param">mask</td><td>Mask of events of interest (MPR_READABLE | MPR_WRITABLE).</td></tr>
    <tr><td class="param">timeout</td><td>Timeout in milliseconds to wait for an event.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A count of events received.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa0e15d53ab8eab3472f5a170d4e3f27b"></a>
<div class="api">
  <div class="prototype">
    void
    mprWaitOn
(<a href="#struct_mpr_wait_handler" class="ref">MprWaitHandler</a> *wp, int desiredMask)
  </div>
  <div class="apiDetail">
<p>Subscribe for desired wait events.</p>
    <dl><dt><b>Description</b>:</dt><dd>Subscribe to the desired wait events for a given wait handler.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Wait handler created via mprCreateWaitHandler.</td></tr>
    <tr><td class="param">desiredMask</td><td>Mask of desired events (MPR_READABLE | MPR_WRITABLE).</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a808f02a00f1b4a1048d9a07124d26891"></a>
<div class="api">
  <div class="prototype">
    void
    mprWakeEventService
(void )
  </div>
  <div class="apiDetail">
<p>Wake the event service.</p>
    <dl><dt><b>Description</b>:</dt><dd>Used to wake the event service if an event is queued for service.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ad85cef853dbc0a16f343e7c720708ce8"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprWriteCache
(<a href="#struct_mpr_cache" class="ref">MprCache</a> *cache, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value, <a href="#mpr_8h_1a094e0c6234adac79949a031e8f24690c" class="ref">MprTime</a> modified, <a href="#mpr_8h_1adbceeccda24c35e7b4c6090db7065319" class="ref">MprTicks</a> lifespan, <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> version, int options)
  </div>
  <div class="apiDetail">
<p>Write a cache item.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cache</td><td>The cache instance object returned from <a class="ref" href="#mpr_8h_1a723be1009e7b9cd130cc53f2f3545e94">mprCreateCache</a></td></tr>
    <tr><td class="param">key</td><td>Cache item key to write.</td></tr>
    <tr><td class="param">value</td><td>Value to set for the cache item. This must be allocated memory.</td></tr>
    <tr><td class="param">modified</td><td>Value to set for the cache last modified time. If set to zero, the current time is obtained via <a class="ref" href="#mpr_8h_1a874f0ee5e3ec4ea75e4b6c5ac75e83ae">mprGetTime</a></td></tr>
    <tr><td class="param">lifespan</td><td>Lifespan of the item in milliseconds. The item will be removed from the cache by the Cache manager when the lifetime expires unless it is rewritten to extend the lifespan.</td></tr>
    <tr><td class="param">version</td><td>Expected version number of the item. This is used to do transactional writes to the cache item. First the version number is retrieved via <a class="ref" href="#mpr_8h_1a9a5e2d48f59b4d7c88ec76cc311b0c70">mprReadCache</a> and that version number is supplied to mprWriteCache when the item is updated. If another caller updates the item in between the read/write, the version number will not match when the item is subsequently written and this call will fail with the <a class="ref" href="#mpr_8h_1ac23aecc1451d49a5b30ec93eef8a82fa">MPR_ERR_BAD_STATE</a> return code. Set to zero if version checking is not required.</td></tr>
    <tr><td class="param">options</td><td>Options to control how the item value is updated. Use <a class="ref" href="#mpr_8h_1a6fc9fc42118cf01738a7f1d8242d2b2a">MPR_CACHE_SET</a> to update the cache item and create if it does not exist. Use <a class="ref" href="#mpr_8h_1ac198d9d7c49a8c4b6e6770119437054c">MPR_CACHE_ADD</a> to add the item only if it does not already exits. Use <a class="ref" href="#mpr_8h_1a2282b63defc144dc2c8877014b746130">MPR_CACHE_APPEND</a> to append the parameter value to any existing cache item value. Use <a class="ref" href="#mpr_8h_1a21ba7373200a15b53e7e027fd446ff16">MPR_CACHE_PREPEND</a> to prepend the value.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>If writing the cache item was successful this call returns the number of bytes written. Otherwise a negative MPR error code is returned. <a class="ref" href="#mpr_8h_1ac23aecc1451d49a5b30ec93eef8a82fa">MPR_ERR_BAD_STATE</a> will be returned if an invalid version number is supplied. <a class="ref" href="#mpr_8h_1a0a19880d5b8b35cbd243601c3fdebc9a">MPR_ERR_ALREADY_EXISTS</a> will be returned if <a class="ref" href="#mpr_8h_1ac198d9d7c49a8c4b6e6770119437054c">MPR_CACHE_ADD</a> is specified and the cache item already exists.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa3c9a3297a496bc567acf3c09e71596e"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprWriteCmd
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, int channel, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> bufsize)
  </div>
  <div class="apiDetail">
<p>Write data to an I/O channel.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is a non-blocking write and may return having written less than requested.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    <tr><td class="param">channel</td><td>Channel number to read from. Should be either MPR_CMD_STDIN, MPR_CMD_STDOUT or MPR_CMD_STDERR.</td></tr>
    <tr><td class="param">buf</td><td>Buffer to read into.</td></tr>
    <tr><td class="param">bufsize</td><td>Size of buffer.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Count of bytes written.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac355af7d14d5b35fbcbf21e067b0104e"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprWriteCmdBlock
(<a href="#struct_mpr_cmd" class="ref">MprCmd</a> *cmd, int channel, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> bufsize)
  </div>
  <div class="apiDetail">
<p>Write data to an I/O channel.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is a blocking write.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cmd</td><td><a class="ref" href="#struct_mpr_cmd">MprCmd</a> object created via mprCreateCmd.</td></tr>
    <tr><td class="param">channel</td><td>Channel number to read from. Should be either MPR_CMD_STDIN, MPR_CMD_STDOUT or MPR_CMD_STDERR.</td></tr>
    <tr><td class="param">buf</td><td>Buffer to read into.</td></tr>
    <tr><td class="param">bufsize</td><td>Size of buffer.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Count of bytes written.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a48b31d54e03c997a5e6b43d070cfa4ac"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprWriteFile
(<a href="#struct_mpr_file" class="ref">MprFile</a> *file, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> count)
  </div>
  <div class="apiDetail">
<p>Write data to a file.</p>
    <dl><dt><b>Description</b>:</dt><dd>Writes data to a file.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">file</td><td>Pointer to an <a class="ref" href="#struct_mpr_file">MprFile</a> object returned via MprOpen.</td></tr>
    <tr><td class="param">buf</td><td>Buffer containing the data to write.</td></tr>
    <tr><td class="param">count</td><td>Cound of characters in buf to write.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The number of characters actually written to the file. Returns a negative MPR error code on errors.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aeb6dab1b192031ce9363f10437d2499e"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprWriteFileFmt
(<a href="#struct_mpr_file" class="ref">MprFile</a> *file, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
  </div>
  <div class="apiDetail">
<p>Write formatted data to a file.</p>
    <dl><dt><b>Description</b>:</dt><dd>Writes a formatted string to a file.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">file</td><td>Pointer to an <a class="ref" href="#struct_mpr_file">MprFile</a> object returned via MprOpen.</td></tr>
    <tr><td class="param">fmt</td><td>Format string.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The number of characters actually written to the file. Returns a negative MPR error code on errors.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aef877b6efa649b5af610862cf06a3a11"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> ssize
    mprWriteFileString
(<a href="#struct_mpr_file" class="ref">MprFile</a> *file, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Write a string to a file.</p>
    <dl><dt><b>Description</b>:</dt><dd>Writes a string to a file.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">file</td><td>Pointer to an <a class="ref" href="#struct_mpr_file">MprFile</a> object returned via MprOpen.</td></tr>
    <tr><td class="param">str</td><td>String to write.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The number of characters actually written to the file. Returns a negative MPR error code on errors.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a569224eeaff8680b96b680e3ba5dc02a"></a>
<div class="api">
  <div class="prototype">
    int
    mprWriteJson
(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value, int type)
  </div>
  <div class="apiDetail">
<p>Write a key/value in the JSON object with a string value.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is a low-level update of a Json property using simple (non-query) keys.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">obj</td><td>Parsed JSON object returned by mprParseJson.</td></tr>
    <tr><td class="param">key</td><td>Property name to add/update.</td></tr>
    <tr><td class="param">value</td><td>Character string value.</td></tr>
    <tr><td class="param">type</td><td>Set to MPR_JSON_FALSE, MPR_JSON_NULL, MPR_JSON_NUMBER, MPR_JSON_STRING, MPR_JSON_TRUE, MPR_JSON_UNDEFINED.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if updated successfully.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a8db37813e63d921df8f5956cc453392c"></a>
<div class="api">
  <div class="prototype">
    int
    mprWriteJsonObj
(<a href="#struct_mpr_json" class="ref">MprJson</a> *obj, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="#struct_mpr_json" class="ref">MprJson</a> *value)
  </div>
  <div class="apiDetail">
<p>Write a property in a JSON object.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is a low-level update of Json property using simple (non-query) keys.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">obj</td><td>Parsed JSON object returned by mprParseJson.</td></tr>
    <tr><td class="param">key</td><td>Property name to add/update.</td></tr>
    <tr><td class="param">value</td><td>Property value to set.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if updated successfully.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a493014d6c3a406207003a3f40eb06843"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprWritePathContents
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len, int mode)
  </div>
  <div class="apiDetail">
<p>Create a file and write contents.</p>
    <dl><dt><b>Description</b>:</dt><dd>The file is created, written and closed. If the file already exists, it is recreated.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Filename to create.</td></tr>
    <tr><td class="param">buf</td><td>Buffer of data to write to the file.</td></tr>
    <tr><td class="param">len</td><td>Size of the buf parameter in bytes.</td></tr>
    <tr><td class="param">mode</td><td>File permissions with which to create the file. E.g. 0644.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The number of bytes written. Should equal len. Otherwise return a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a125e30fab937791fc0c807461bf3c797"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprWriteSocket
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, <a href="osdep.html#group___osdep_1ga5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *buf, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
  </div>
  <div class="apiDetail">
<p>Write to a socket.</p>
    <dl><dt><b>Description</b>:</dt><dd>Write a block of data to a socket. If the socket is in non-blocking mode (the default), the write may return having written less than the required bytes.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    <tr><td class="param">buf</td><td>Reference to a block to write to the socket.</td></tr>
    <tr><td class="param">len</td><td>Length of data to write. This may be less than the requested write length if the socket is in non-blocking mode. Will return a negative MPR error code on errors.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A count of bytes actually written. Return a negative MPR error code on errors and if the socket cannot absorb any more data. If the transport is saturated, will return a negative error and <a class="ref" href="#mpr_8h_1aeecae95080f23d6052020b6f16ec7b92">mprGetError()</a> returns EAGAIN or EWOULDBLOCK.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af9a6fe73adb4fb12fb998bf218b2ac61"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprWriteSocketString
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Write to a string to a socket.</p>
    <dl><dt><b>Description</b>:</dt><dd>Write a string to a socket. If the socket is in non-blocking mode (the default), the write may return having written less than the required bytes.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    <tr><td class="param">str</td><td>Null terminated string to write.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A count of bytes actually written. Return a negative MPR error code on errors.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a793fae1ef308f441f521dedadd9c5d4a"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    mprWriteSocketVector
(<a href="#struct_mpr_socket" class="ref">MprSocket</a> *sp, <a href="#struct_mpr_i_o_vec" class="ref">MprIOVec</a> *iovec, int count)
  </div>
  <div class="apiDetail">
<p>Write a vector of buffers to a socket.</p>
    <dl><dt><b>Description</b>:</dt><dd>Do scatter/gather I/O by writing a vector of buffers to a socket. May return with a short write having written less than the total.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#mpr_8h_1a31b83d376f21110dcc5b980bcc8f1fa0">mprCreateSocket</a></td></tr>
    <tr><td class="param">iovec</td><td>Vector of data to write before the file contents.</td></tr>
    <tr><td class="param">count</td><td>Count of entries in iovec.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A count of bytes actually written. Return a negative MPR error code on errors and if the socket cannot absorb any more data. If the transport is saturated, will return a negative error and <a class="ref" href="#mpr_8h_1aeecae95080f23d6052020b6f16ec7b92">mprGetError()</a> returns EAGAIN or EWOULDBLOCK.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a1f563ac13a665bd5b17f3c991ae60234"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    mprXmlGetErrorMsg
(<a href="#struct_mpr_xml" class="ref">MprXml</a> *xp)
  </div>
  <div class="apiDetail">
<p>Get the XML error message if mprXmlParse fails.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">xp</td><td>XML parser instance returned from mprXmlOpen.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A descriptive null-terminated string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a05338788d8a31a3305ec96890f1dfbde"></a>
<div class="api">
  <div class="prototype">
    int
    mprXmlGetLineNumber
(<a href="#struct_mpr_xml" class="ref">MprXml</a> *xp)
  </div>
  <div class="apiDetail">
<p>Get the source XML line number.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call can be used from within the parser callback or when mprXmlParse fails.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">xp</td><td>XML parser instance returned from mprXmlOpen.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The line number for the current token or error.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a0db90fdc594feb1285964afdc0d69f87"></a>
<div class="api">
  <div class="prototype">
    void *
    mprXmlGetParseArg
(<a href="#struct_mpr_xml" class="ref">MprXml</a> *xp)
  </div>
  <div class="apiDetail">
<p>Get the XML callback argument.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">xp</td><td>XML parser instance returned from mprXmlOpen.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Argument defined to use for the callback.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a72fb60525ced098d59ef7c79cd02b550"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_mpr_xml" class="ref">MprXml</a> *
    mprXmlOpen
(<a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> initialSize, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> maxSize)
  </div>
  <div class="apiDetail">
<p>Open an XML parser instance.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">initialSize</td><td>Initialize size of XML in-memory token buffer.</td></tr>
    <tr><td class="param">maxSize</td><td>Maximum size of XML in-memory token buffer. Set to -1 unlimited.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An XML parser instance.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a1341ea482faf1301d867e71575ba638a"></a>
<div class="api">
  <div class="prototype">
    int
    mprXmlParse
(<a href="#struct_mpr_xml" class="ref">MprXml</a> *xp)
  </div>
  <div class="apiDetail">
<p>Run the XML parser.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">xp</td><td>XML parser instance returned from mprXmlOpen.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful. Otherwise returns a negative MPR error code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a61144d35daf0b10f9f62bbd14eb106af"></a>
<div class="api">
  <div class="prototype">
    void
    mprXmlSetInputStream
(<a href="#struct_mpr_xml" class="ref">MprXml</a> *xp, <a href="#mpr_8h_1ad7d3735f6e2ef85b57904b5cce3832a4" class="ref">MprXmlInputStream</a> fn, void *arg)
  </div>
  <div class="apiDetail">
<p>Define the XML parser input stream.</p>
This
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">xp</td><td>XML parser instance returned from mprXmlOpen.</td></tr>
    <tr><td class="param">fn</td><td>Callback function to provide data to the XML parser. The callback is invoked with the signature: ssize callbac(MprXml *xp, void *arg, char *buf, ssize size);.</td></tr>
    <tr><td class="param">arg</td><td>Callback argument to pass to the.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a815cdc307b58663f2890711f60b690e3"></a>
<div class="api">
  <div class="prototype">
    void
    mprXmlSetParseArg
(<a href="#struct_mpr_xml" class="ref">MprXml</a> *xp, void *parseArg)
  </div>
  <div class="apiDetail">
<p>Set the XML callback argument.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">xp</td><td>XML parser instance returned from mprXmlOpen.</td></tr>
    <tr><td class="param">parseArg</td><td>Argument to use for the callback.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a015f91fb1d39230057a368fb225f45b8"></a>
<div class="api">
  <div class="prototype">
    void
    mprXmlSetParserHandler
(<a href="#struct_mpr_xml" class="ref">MprXml</a> *xp, <a href="#mpr_8h_1aa49d1c32fc1e641828bf8ffbcf675be6" class="ref">MprXmlHandler</a> h)
  </div>
  <div class="apiDetail">
<p>Set the XML parser data handle.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">xp</td><td>XML parser instance returned from mprXmlOpen.</td></tr>
    <tr><td class="param">h</td><td>Arbitrary data to associate with the parser.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af140a2fda18b2e8461236cc44c0a2cc4"></a>
<div class="api">
  <div class="prototype">
    void
    mprYield
(int flags)
  </div>
  <div class="apiDetail">
<p>Signify to the garbage collector that the thread is ready for garbage collection.</p>
    <dl><dt><b>Description</b>:</dt><dd>This routine informas the garbage collector that the thread has secured all memory that must be retained and is now ready for garbage collection. The MPR has a cooperative garbage collector that runs only when all threads are ready for collection. Consequently, it is essential that threads &quot;yield&quot; before sleeping or blocking. <br/><br/>
Normally, all threads yield automatically when waiting for I/O or otherwise sleeping via standard MPR routines. MPR threads tyically yield in their event loops and thread pool idle routines, so threads should not need to call mprYield unless calling custom blocking routines or long running routines. <br/><br/>
When calling a blocking routine, you should call mprYield(MPR_YIELD_STICK) to put the thread into a yielded state. When the blocking call returns, you should call <a class="ref" href="#mpr_8h_1aa4bf0d2c9a7c854dcb9edc83035c84ba">mprResetYield()</a><br/><br/>
While yielded, all transient memory must have references from &quot;managed&quot; objects (see mprAlloc) to ensure required memory is retained. All other memory will be reclaimed. <br/><br/>
If a thread blocks and does not yield, it will prevent garbage collection and the applications memory size will grow unnecessarily.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">flags</td><td>Set to MPR_YIELD_WAIT to wait until the next collection is run. Set to MPR_YIELD_COMPLETE to wait until the garbage collection is fully complete including sweep phase. This is not normally required as the sweeper runs in parallel with user threads. Set to MPR_YIELD_STICKY to remain in the yielded state. This is useful when sleeping or blocking waiting for I/O. <a class="ref" href="#mpr_8h_1aa4bf0d2c9a7c854dcb9edc83035c84ba">mprResetYield</a> must be called after setting a sticky yield.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a8d6cb9b325abdacbaa410ea72b1f7a38"></a>
<div class="api">
  <div class="prototype">
    void *
    palloc
(<a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a> size)
  </div>
  <div class="apiDetail">
<p>Allocate a &quot;permanent&quot; block of memory that is not subject GC.</p>
    <dl><dt><b>Description</b>:</dt><dd>This allocates a block of memory using the MPR allocator. It then calls mprHold on the block. to prevent GC from freeing the block.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">size</td><td>Size of the memory block to allocate.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a pointer to the allocated block. If memory is not available the memory exhaustion handler specified via mprCreate will be called to allow global recovery.</dd></dl>
    <dl><dt>Remarks:</dt><dd>Do not mix calls to palloc and malloc.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aeaa51be2edf47468d51a0c6881d5f818"></a>
<div class="api">
  <div class="prototype">
    void
    pfree
(void *ptr)
  </div>
  <div class="apiDetail">
<p>Free a &quot;permanent&quot; block of memory allocated via &quot;palloc&quot;.</p>
    <dl><dt><b>Description</b>:</dt><dd>This releases a block of memory allocated via &quot;palloc&quot; to be collected by the garbage collector.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ptr</td><td>Pointer to the block.</td></tr>
    </table></dd></dl>
    <dl><dt>Remarks:</dt><dd>Do not mix calls to pfree and free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a22480c1aa6585a10947f840d8158fb33"></a>
<div class="api">
  <div class="prototype">
    void *
    prealloc
(void *ptr, <a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a> size)
  </div>
  <div class="apiDetail">
<p>Reallocate a &quot;permanent&quot; block of memory allocated via &quot;palloc&quot;.</p>
This function should not be used by foreign (non
Mpr
) threads
    <dl><dt><b>Description</b>:</dt><dd>This increases the size of a block of memory allocated via &quot;palloc&quot;.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ptr</td><td>Pointer to the block.</td></tr>
    <tr><td class="param">size</td><td>New block size.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a pointer to the allocated block. If memory is not available the memory exhaustion handler specified via mprCreate will be called to allow global recovery.</dd></dl>
    <dl><dt>Remarks:</dt><dd>Do not mix calls to prealloc and malloc.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a236c3aa84ff00b9943935bcc3ad783f5"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> ssize,ssize,ssize
    print
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
  </div>
  <div class="apiDetail">
<p>Print to stdout and add a trailing newline.</p>
  </div>
</div>
<a name="mpr_8h_1af167765e018de0c039c97817f31dc6a3"></a>
<div class="api">
  <div class="prototype">
    <a href="#mpr_8h_1a1600235df88b3821764244933b5024f5" class="ref">size_t</a>
    psize
(void *ptr)
  </div>
  <div class="apiDetail">
<p>Return the size of the block.</p>
This may be larger than what was originally requested. This function should not be used by foreign (non
Mpr
) threads
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ptr</td><td>Pointer to the block.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Size of the allocated block.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ab7d638edc4b0a18b2116b344b06b47b5"></a>
<div class="api">
  <div class="prototype">
    char *
    scamel
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Create a camel case version of the string.</p>
    <dl><dt><b>Description</b>:</dt><dd>Copy a string into a newly allocated block and make the first character lower case.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>Pointer to the block to duplicate.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a newly allocated string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1af9cb27956141ddc4724cca9903fa69b2"></a>
<div class="api">
  <div class="prototype">
    int
    scaselesscmp
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2)
  </div>
  <div class="apiDetail">
<p>Compare strings ignoring case.</p>
This is a safe replacement for strcasecmp. It can handle NULL args
    <dl><dt><b>Description</b>:</dt><dd>Compare two strings ignoring case differences. This call operates similarly to strcmp.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">s1</td><td>First string to compare.</td></tr>
    <tr><td class="param">s2</td><td>Second string to compare.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns zero if the strings are equivalent, &lt; 0 if s1 sorts lower than s2 in the collating sequence or &gt; 0 if it sorts higher.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa6a0814be845b14c9b87a717047f85ec"></a>
<div class="api">
  <div class="prototype">
    char *
    scaselesscontains
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *pattern)
  </div>
  <div class="apiDetail">
<p>Find a pattern in a string with a caseless comparison.</p>
    <dl><dt><b>Description</b>:</dt><dd>Locate the first occurrence of pattern in a string.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>Pointer to the string to search.</td></tr>
    <tr><td class="param">pattern</td><td>String pattern to search for.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a reference to the start of the pattern in the string. If not found, returns NULL.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a021eac46fe21719fb1f9c9d257f64280"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    scaselessmatch
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2)
  </div>
  <div class="apiDetail">
<p>Compare strings ignoring case.</p>
This is similar to scaselesscmp but it returns a boolean
    <dl><dt><b>Description</b>:</dt><dd>Compare two strings ignoring case differences.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">s1</td><td>First string to compare.</td></tr>
    <tr><td class="param">s2</td><td>Second string to compare.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns true if the strings are equivalent, otherwise false.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ad15a2ce6c7fdb207c3ad26e7bc60cb19"></a>
<div class="api">
  <div class="prototype">
    char *
    schr
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, int c)
  </div>
  <div class="apiDetail">
<p>Find a character in a string.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is a safe replacement for strchr. It can handle NULL args.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to examine.</td></tr>
    <tr><td class="param">c</td><td>Character to search for.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>If the character is found, the call returns a reference to the character position in the string. Otherwise, returns NULL.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1acb666da0fc979829bdfa3805d30690b8"></a>
<div class="api">
  <div class="prototype">
    char *
    sclone
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Clone a string.</p>
    <dl><dt><b>Description</b>:</dt><dd>Copy a string into a newly allocated block.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>Pointer to the block to duplicate.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a newly allocated string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a130862b0d455d9584014457bfeb4c139"></a>
<div class="api">
  <div class="prototype">
    int
    scmp
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2)
  </div>
  <div class="apiDetail">
<p>Compare strings.</p>
    <dl><dt><b>Description</b>:</dt><dd>Compare two strings. This is a safe replacement for strcmp. It can handle null args.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">s1</td><td>First string to compare.</td></tr>
    <tr><td class="param">s2</td><td>Second string to compare.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns zero if the strings are identical. Return -1 if the first string is less than the second. Return 1 if the first string is greater than the second.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a0c956f14f59854ad852e186a5691fd17"></a>
<div class="api">
  <div class="prototype">
    char *
    scontains
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *pattern)
  </div>
  <div class="apiDetail">
<p>Find a pattern in a string.</p>
    <dl><dt><b>Description</b>:</dt><dd>Locate the first occurrence of pattern in a string.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>Pointer to the string to search.</td></tr>
    <tr><td class="param">pattern</td><td>String pattern to search for.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a reference to the start of the pattern in the string. If not found, returns NULL.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a96df0c576bf6004507a3d0d11e18599a"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    scopy
(char *dest, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> destMax, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *src)
  </div>
  <div class="apiDetail">
<p>Copy a string.</p>
    <dl><dt><b>Description</b>:</dt><dd>Safe replacement for strcpy. Copy a string and ensure the destination buffer is not overflowed. The call returns the length of the resultant string or an error code if it will not fit into the target string. This is similar to strcpy, but it will enforce a maximum size for the copied string and will ensure it is always terminated with a null.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">dest</td><td>Pointer to a pointer that will hold the address of the allocated block.</td></tr>
    <tr><td class="param">destMax</td><td>Maximum size of the target string in characters.</td></tr>
    <tr><td class="param">src</td><td>String to copy.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The number of characters in the target string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a9bda617838d96d3e987c81c20616263f"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    sends
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *suffix)
  </div>
  <div class="apiDetail">
<p>Test if the string ends with a given pattern.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to examine.</td></tr>
    <tr><td class="param">suffix</td><td>Pattern to search for.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a pointer to the start of the pattern if found. Otherwise returns NULL.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aa8268a9b3d82b99597f99088126f8f54"></a>
<div class="api">
  <div class="prototype">
    void
    serase
(char *str)
  </div>
  <div class="apiDetail">
<p>Erase the contents of a string.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to erase.</td></tr>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aca549ba73a2f8c4fe20ec62874028c2a"></a>
<div class="api">
  <div class="prototype">
    char *
    sfmt
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
  </div>
  <div class="apiDetail">
<p>Format a string.</p>
This is a secure verion of printf that can handle null args
    <dl><dt><b>Description</b>:</dt><dd>Format the given arguments according to the printf style format. See mprPrintf for a full list of the format specifies. This is a secure replacement for sprintf, it can handle null arguments without crashes.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">fmt</td><td>Printf style format string.</td></tr>
    <tr><td class="param">...</td><td>Variable arguments for the format string.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a newly allocated string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aeafcc9222db8944b862cbb73aef6039a"></a>
<div class="api">
  <div class="prototype">
    char char *
    sfmtv
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, va_list args)
  </div>
  <div class="apiDetail">
<p>Format a string.</p>
This is a secure verion of printf that can handle null args
    <dl><dt><b>Description</b>:</dt><dd>Format the given arguments according to the printf style format. See mprPrintf for a full list of the format specifies. This is a secure replacement for sprintf, it can handle null arguments without crashes.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">fmt</td><td>Printf style format string.</td></tr>
    <tr><td class="param">args</td><td>Varargs argument obtained from va_start.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a newly allocated string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a28eb81d75667d4866e1cf05c0ae5d3c5"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga91ad9478d81a7aaf2593e8d9c3d06a14" class="ref">uint</a>
    shash
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
  </div>
  <div class="apiDetail">
<p>Compute a hash code for a string.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to examine.</td></tr>
    <tr><td class="param">len</td><td>Length in characters of the string to include in the hash code.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns an unsigned integer hash code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a0fa08b3d620074fc5959db864f0d448a"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga91ad9478d81a7aaf2593e8d9c3d06a14" class="ref">uint</a>
    shashlower
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
  </div>
  <div class="apiDetail">
<p>Compute a caseless hash code for a string.</p>
    <dl><dt><b>Description</b>:</dt><dd>This computes a hash code for the string after converting it to lower case.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to examine.</td></tr>
    <tr><td class="param">len</td><td>Length in characters of the string to include in the hash code.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns an unsigned integer hash code.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a9a07724da59f3ad7ffe2cfedf795468b"></a>
<div class="api">
  <div class="prototype">
    char *
    sjoin
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, ...)
  </div>
  <div class="apiDetail">
<p>Catenate strings.</p>
    <dl><dt><b>Description</b>:</dt><dd>This catenates strings together with an optional string separator. If the separator is NULL, not separator is used. This call accepts a variable list of strings to append, terminated by a null argument.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>First string to catentate.</td></tr>
    <tr><td class="param">...</td><td>Variable number of string arguments to append. Terminate list with NULL.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns an allocated string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ae275c858f9b009506e13b0c9746b9751"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    sjoinArgs
(int argc, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> **argv, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *sep)
  </div>
  <div class="apiDetail">
<p>Join an array of strings.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">argc</td><td>number of strings to join.</td></tr>
    <tr><td class="param">argv</td><td>Array of strings.</td></tr>
    <tr><td class="param">sep</td><td>Separator string to use. If NULL, then no separator is used.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A single joined string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a3fa2c135b48b9c584173fd355ac0596b"></a>
<div class="api">
  <div class="prototype">
    char *
    sjoinv
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, va_list args)
  </div>
  <div class="apiDetail">
<p>Catenate strings.</p>
    <dl><dt><b>Description</b>:</dt><dd>This catenates strings together with an optional string separator. If the separator is NULL, not separator is used. This call accepts a variable list of strings to append, terminated by a null argument.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>First string to catentate.</td></tr>
    <tr><td class="param">args</td><td>Varargs argument obtained from va_start.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns an allocated string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ade405095134ad54db6dc94fcd6216961"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    slen
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Return the length of a string.</p>
    <dl><dt><b>Description</b>:</dt><dd>Safe replacement for strlen. This call returns the length of a string and tests if the length is less than a given maximum. It will return zero for NULL args.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to measure.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The length of the string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a790b3a7ef67d4d7125eb26a8de2448b4"></a>
<div class="api">
  <div class="prototype">
    char *
    slower
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Convert a string to lower case.</p>
    <dl><dt><b>Description</b>:</dt><dd>Convert a string to its lower case equivalent.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to convert.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1abe7d2af6c4afc8a57904b9276a43ffea"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    smatch
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2)
  </div>
  <div class="apiDetail">
<p>Compare strings.</p>
    <dl><dt><b>Description</b>:</dt><dd>Compare two strings. This is similar to <a class="ref" href="#mpr_8h_1a130862b0d455d9584014457bfeb4c139">scmp</a> but it returns a boolean.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">s1</td><td>First string to compare.</td></tr>
    <tr><td class="param">s2</td><td>Second string to compare.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns true if the strings are equivalent, otherwise false.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a3048479e10744453528e48099cae5542"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    smatchsec
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2)
  </div>
  <div class="apiDetail">
<p>Secure compare strings.</p>
    <dl><dt><b>Description</b>:</dt><dd>Compare two strings in constant time. This is similar to <a class="ref" href="#mpr_8h_1abe7d2af6c4afc8a57904b9276a43ffea">smatch</a> but will not fail fast on first char mismatch.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">s1</td><td>First string to compare.</td></tr>
    <tr><td class="param">s2</td><td>Second string to compare.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns true if the strings are equivalent, otherwise false.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Prototype.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a30d6259caa94ed51abd25be83c0c4972"></a>
<div class="api">
  <div class="prototype">
    int
    sncaselesscmp
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
  </div>
  <div class="apiDetail">
<p>Compare strings ignoring case.</p>
    <dl><dt><b>Description</b>:</dt><dd>Compare two strings ignoring case differences for a given string length. This call operates similarly to strncasecmp.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">s1</td><td>First string to compare.</td></tr>
    <tr><td class="param">s2</td><td>Second string to compare.</td></tr>
    <tr><td class="param">len</td><td>Length of characters to compare.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns zero if the strings are equivalent, &lt; 0 if s1 sorts lower than s2 in the collating sequence or &gt; 0 if it sorts higher.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ac7b32955df45bde95b12f8d42ef54e01"></a>
<div class="api">
  <div class="prototype">
    char *
    sncaselesscontains
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *pattern, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> limit)
  </div>
  <div class="apiDetail">
<p>Find a pattern in a string with a limit and a caseless comparison.</p>
    <dl><dt><b>Description</b>:</dt><dd>Locate the first occurrence of pattern in a string, but do not search more than the given character limit.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>Pointer to the string to search.</td></tr>
    <tr><td class="param">pattern</td><td>String pattern to search for.</td></tr>
    <tr><td class="param">limit</td><td>Count of characters in the string to search.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a reference to the start of the pattern in the string. If not found, returns NULL.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a86e917f9fb726d0399bc0f977d500718"></a>
<div class="api">
  <div class="prototype">
    char *
    snclone
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
  </div>
  <div class="apiDetail">
<p>Clone a substring.</p>
    <dl><dt><b>Description</b>:</dt><dd>Copy a substring into a newly allocated block.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>Pointer to the block to duplicate.</td></tr>
    <tr><td class="param">len</td><td>Number of bytes to copy. The actual length copied is the minimum of the given length and the length of the supplied string. The result is null terminated.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a newly allocated string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5217429e3f1dd3731530fe287bd893a7"></a>
<div class="api">
  <div class="prototype">
    int
    sncmp
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
  </div>
  <div class="apiDetail">
<p>Compare strings.</p>
    <dl><dt><b>Description</b>:</dt><dd>Compare two strings for a given string length. This call operates similarly to strncmp.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">s1</td><td>First string to compare.</td></tr>
    <tr><td class="param">s2</td><td>Second string to compare.</td></tr>
    <tr><td class="param">len</td><td>Length of characters to compare.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns zero if the strings are equivalent, &lt; 0 if s1 sorts lower than s2 in the collating sequence or &gt; 0 if it sorts higher.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a298af255a2884458c4fe46c3ee320a4b"></a>
<div class="api">
  <div class="prototype">
    char *
    sncontains
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *pattern, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> limit)
  </div>
  <div class="apiDetail">
<p>Find a pattern in a string with a limit.</p>
    <dl><dt><b>Description</b>:</dt><dd>Locate the first occurrence of pattern in a string, but do not search more than the given character limit.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>Pointer to the string to search.</td></tr>
    <tr><td class="param">pattern</td><td>String pattern to search for.</td></tr>
    <tr><td class="param">limit</td><td>Count of characters in the string to search.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a reference to the start of the pattern in the string. If not found, returns NULL.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a9e34c10326cd5ffd7a9865bb224960b0"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    sncopy
(char *dest, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> destMax, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *src, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
  </div>
  <div class="apiDetail">
<p>Copy characters from a string.</p>
    <dl><dt><b>Description</b>:</dt><dd>Safe replacement for strncpy. Copy bytes from a string and ensure the target string is not overflowed. The call returns the length of the resultant string or an error code if it will not fit into the target string. This is similar to strcpy, but it will enforce a maximum size for the copied string and will ensure it is terminated with a null.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">dest</td><td>Pointer to a pointer that will hold the address of the allocated block.</td></tr>
    <tr><td class="param">destMax</td><td>Maximum size of the target string in characters.</td></tr>
    <tr><td class="param">src</td><td>String to copy.</td></tr>
    <tr><td class="param">len</td><td>Maximum count of characters to copy.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a reference to the destination if successful or NULL if the string won&apos;t fit.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a80f844ded2d7567f16d75bab67fd6fb1"></a>
<div class="api">
  <div class="prototype">
    char *
    spbrk
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *set)
  </div>
  <div class="apiDetail">
<p>Locate the a character from a set in a string.</p>
    <dl><dt><b>Description</b>:</dt><dd>This locates in the string the first occurence of any character from a given set of characters.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to examine.</td></tr>
    <tr><td class="param">set</td><td>Set of characters to scan for.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a reference to the first character from the given set. Returns NULL if none found.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ab380804dbe3a376a3b054b76e63a5aa1"></a>
<div class="api">
  <div class="prototype">
    char *
    sptok
(char *str, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *pattern, char **last)
  </div>
  <div class="apiDetail">
<p>Tokenize a string.</p>
    <dl><dt><b>Description</b>:</dt><dd>Split a string into tokens using a string pattern as delimiters.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to tokenize.</td></tr>
    <tr><td class="param">pattern</td><td>String pattern to use for token delimiters.</td></tr>
    <tr><td class="param">last</td><td>Last token pointer.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a pointer to the next token.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a909f95ef7e493e05d6794a294f4066b7"></a>
<div class="api">
  <div class="prototype">
    char *
    srchr
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, int c)
  </div>
  <div class="apiDetail">
<p>Find a character in a string by searching backwards.</p>
    <dl><dt><b>Description</b>:</dt><dd>This locates in the string the last occurence of a character.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to examine.</td></tr>
    <tr><td class="param">c</td><td>Character to scan for.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a reference in the string to the requested character. Returns NULL if none found.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ad094f0c7906f4e953d0a06ea2dceb410"></a>
<div class="api">
  <div class="prototype">
    char *
    srejoin
(char *buf, ...)
  </div>
  <div class="apiDetail">
<p>Append strings to an existing string and reallocate as required.</p>
    <dl><dt><b>Description</b>:</dt><dd>Append a list of strings to an existing string. The list of strings is terminated by a null argument. The call returns the size of the allocated block.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Existing (allocated) string to reallocate. May be null. May not be a string literal.</td></tr>
    <tr><td class="param">...</td><td>Variable number of string arguments to append. Terminate list with NULL.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns an allocated string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a97b7b27c2b7132a44e21f6a218ea037c"></a>
<div class="api">
  <div class="prototype">
    char *
    srejoinv
(char *buf, va_list args)
  </div>
  <div class="apiDetail">
<p>Append strings to an existing string and reallocate as required.</p>
    <dl><dt><b>Description</b>:</dt><dd>Append a list of strings to an existing string. The list of strings is terminated by a null argument. The call returns the size of the allocated block.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Existing (allocated) string to reallocate. May be null. May not be a string literal.</td></tr>
    <tr><td class="param">args</td><td>Varargs argument obtained from va_start.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns an allocated string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a1098055d6e169edf28f29b216065920e"></a>
<div class="api">
  <div class="prototype">
    char *
    ssplit
(char *str, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *delim, char **last)
  </div>
  <div class="apiDetail">
<p>Split a string at a delimiter.</p>
    <dl><dt><b>Description</b>:</dt><dd>Split a string and return parts. The string is modified. This routiner never returns null. If there are leading delimiters, the empty string will be returned and *last will be set to the portion after the delimiters. If str is null, a managed reference to the empty string will be returned. If there are no characters after the delimiter, then *last will be set to the empty string.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to tokenize.</td></tr>
    <tr><td class="param">delim</td><td>Set of characters that are used as token separators.</td></tr>
    <tr><td class="param">last</td><td>Reference to the portion after the delimiters. Will return an empty string if is not trailing portion.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a pointer to the first part before the delimiters. If the string begins with delimiters, the empty string will be returned.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a812228240ff7b596dd2caaac2b9c5a35"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    sspn
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *set)
  </div>
  <div class="apiDetail">
<p>Find the end of a spanning prefix.</p>
    <dl><dt><b>Description</b>:</dt><dd>This scans the given string for characters from the set and returns an index to the first character not in the set.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to examine.</td></tr>
    <tr><td class="param">set</td><td>Set of characters to span.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns an index to the first character after the spanning set. If not found, returns the index of the first null.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a5eec22bfd3a58a8c344d30175849f2ee"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#group___osdep_1gad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    sstarts
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *prefix)
  </div>
  <div class="apiDetail">
<p>Test if the string starts with a given pattern.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to examine.</td></tr>
    <tr><td class="param">prefix</td><td>Pattern to search for.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns TRUE if the pattern was found. Otherwise returns zero.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a58b9dc0d8e314b0abc98de8739ee3756"></a>
<div class="api">
  <div class="prototype">
    char *
    ssub
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> offset, <a href="osdep.html#group___osdep_1ga7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> length)
  </div>
  <div class="apiDetail">
<p>Create a substring.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to examine.</td></tr>
    <tr><td class="param">offset</td><td>Starting offset within str for the beginning of the substring.</td></tr>
    <tr><td class="param">length</td><td>Length of the substring in characters.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a newly allocated substring.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1aeafb6bb78fe09355365967e317889593"></a>
<div class="api">
  <div class="prototype">
    char *
    stemplate
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, struct MprHash *tokens)
  </div>
  <div class="apiDetail">
<p>Replace template tokens in a string with values from a lookup table.</p>
Tokens are ${variable} references
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to expand.</td></tr>
    <tr><td class="param">tokens</td><td>Hash table of token values to use.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An expanded string. May return the original string if no &quot;$&quot; references are present.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#mpr_8h_1aba79a15513be86f5951110d957da8173" class="ref">stemplateJson</a></dd></dl>
  </div>
</div>
<a name="mpr_8h_1aba79a15513be86f5951110d957da8173"></a>
<div class="api">
  <div class="prototype">
    char *
    stemplateJson
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, struct MprJson *tokens)
  </div>
  <div class="apiDetail">
<p>Replace template tokens in a string with values from a lookup table.</p>
Tokens are ${variable} references
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to expand.</td></tr>
    <tr><td class="param">tokens</td><td>Json object of token values to use.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An expanded string. May return the original string if no &quot;$&quot; references are present.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#mpr_8h_1aeafb6bb78fe09355365967e317889593" class="ref">stemplate</a></dd></dl>
  </div>
</div>
<a name="mpr_8h_1a6cda5ecd6831c87de8afd3c99f266472"></a>
<div class="api">
  <div class="prototype">
    char *
    stitle
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Create a Title Case version of the string.</p>
    <dl><dt><b>Description</b>:</dt><dd>Copy a string into a newly allocated block and make the first character upper case.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>Pointer to the block to duplicate.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a newly allocated string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a4f77165d6ba4eb33ee3ef67a910e0f4b"></a>
<div class="api">
  <div class="prototype">
    double
    stof
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Convert a string to a double.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call converts the supplied string to a double.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>Pointer to the string to parse.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The double equivalent value of the string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1ab24da0fe30b572a18321fa16e3dbfa19"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a>
    stoi
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Convert a string to an integer.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call converts the supplied string to an integer using base 10.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>Pointer to the string to parse.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The integer equivalent value of the string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a851760bd4787be87c785d158892eaf82"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a>
    stoiradix
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, int radix, int *err)
  </div>
  <div class="apiDetail">
<p>Convert a string to an integer.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call converts the supplied string to an integer using the specified radix (base).</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>Pointer to the string to parse.</td></tr>
    <tr><td class="param">radix</td><td>Base to use when parsing the string.</td></tr>
    <tr><td class="param">err</td><td>Return error code. Set to 0 if successful.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The integer equivalent value of the string.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1adbeb0bae6f0eaa147eaab42666cc5fb2"></a>
<div class="api">
  <div class="prototype">
    char *
    stok
(char *str, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *delim, char **last)
  </div>
  <div class="apiDetail">
<p>Tokenize a string.</p>
    <dl><dt><b>Description</b>:</dt><dd>Split a string into tokens using a character set as delimiters.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to tokenize.</td></tr>
    <tr><td class="param">delim</td><td>Set of characters that are used as token separators.</td></tr>
    <tr><td class="param">last</td><td>Last token pointer. This is a pointer inside the original string.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a pointer to the next token. The pointer is inside the original string and is not allocated.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a34014659316038dc8b8bd6df13b3ee25"></a>
<div class="api">
  <div class="prototype">
    struct MprList *
    stolist
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *src)
  </div>
  <div class="apiDetail">
<p>String to list.</p>
This parses the string into space separated arguments. Single and double quotes are supported
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">src</td><td>Source string to parse.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>List of arguments.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a75c783da24379c3ec2099f34d70dfd2c"></a>
<div class="api">
  <div class="prototype">
    char *
    strim
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *set, int where)
  </div>
  <div class="apiDetail">
<p>Trim a string.</p>
    <dl><dt><b>Description</b>:</dt><dd>Trim leading and trailing characters off a string. The original string is not modified and the return value is a newly allocated string.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to trim.</td></tr>
    <tr><td class="param">set</td><td>String of characters to remove.</td></tr>
    <tr><td class="param">where</td><td>Flags to indicate trim from the start, end or both. Use MPR_TRIM_START, MPR_TRIM_END, MPR_TRIM_BOTH.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a newly allocated trimmed string. May not equal str.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="mpr_8h_1a3a2a03da7c916044aa7d700a0f5dda48"></a>
<div class="api">
  <div class="prototype">
    char *
    supper
(<a href="osdep.html#group___osdep_1ga0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Convert a string to upper case.</p>
    <dl><dt><b>Description</b>:</dt><dd>Convert a string to its upper case equivalent.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to convert.</td></tr>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a pointer to an allocated string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
